Skip to content

sirsimon/snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Snippets

CDA movie

var a = $('.brdPlayerWrapper object [name=flashvars]').attr('value');
var b = a.substring($('.brdPlayerWrapper object [name=flashvars]').attr('value').indexOf('file=') + 5);
    b = decodeURIComponent(b.substring(0, b.indexOf('&')));

Redmine log

var b = [], a = [];
$($0).parents('dl').find('a').each(function() {
    if ($(this)[0].text.indexOf('#') > -1) {
    	var id = $(this)[0].text.match(/#\d+/)[0];
        if (b.indexOf(id) === -1) {
            a.push(id + ' ' + $(this)[0].text.match(/: .*/)[0].substr(2));
            b.push(id);
        }
    }
});
"\n" + a.reverse().join("\n") + "\n";

GIT Bash

# review
branch="$(git rev-parse --abbrev-ref HEAD)"
review="git push origin HEAD:refs/for/${branch}"
${review}

# reset
branch="$(git rev-parse --abbrev-ref HEAD)"
reset="git reset --hard origin/${branch}"
${reset}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published