#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| #!/bin/sh | |
| # PHP CodeSniffer pre-receive hook for git | |
| PHPCS_BIN="/usr/bin/phpcs" | |
| PHPCS_CODING_STANDARD="PEAR" | |
| # use coding standart dir from local repo | |
| PHPCS_DIR_LOCAL=0 | |
| TMP_DIR=$(mktemp -d --tmpdir phpcs-pre-receive-hook.XXXXXXXX) | |
| mkdir "$TMP_DIR/source" |
| #!/usr/bin/env perl | |
| use DBI; | |
| use Test::More tests => 3; | |
| use strict; | |
| use warnings; | |
| my $options = {mysql_auto_reconnect => 1}; | |
| my $dbh = DBI->connect("dbi:mysql:", undef, undef, $options); |
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| my ($base_url, $articles_dir) = @ARGV; | |
| $base_url && $articles_dir or die "Usage: $0 <base_url> <articles_directory>"; | |
| opendir(my $dh, $articles_dir) || die "can't opendir $articles_dir: $!"; |
| # using libfaac on Mac OS X 10.6.8 | |
| # -vn : not copying video | |
| # -acodec : specify codec used in flv file | |
| # -ac : channels. 1 is for mono, 2 is for stereo | |
| # -ab : specify bitrate for output file (note that rate is not kbps but bps) | |
| # -ar : sampling frequency (Hz) | |
| # -threads: number of threads for encoding | |
| # "-strict experimental" is necessary to use libfaac | |
| ffmpeg -y -i xxxxxxxxxxx.flv -vn -acodec aac -ac 2 -ab 128000 -ar 44100 -threads 4 -strict experimental xxxxx.m4a |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
| <title>jQuery.plugin.convertTableToScrollable test</title> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"></script> | |
| <script type="text/javascript" src="jQuery.plugin.convertTableToScrollable.js"></script> | |
| <style type="text/css"> | |
| table { | |
| border-collapse: collapse; |
| #!/usr/bin/perl | |
| use v5.14; | |
| use strict; | |
| use warnings; | |
| use PPI; | |
| use Scalar::Util qw(blessed); | |
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
| // jQuery plugin: add .serializeObject() method to jQuery | |
| // at this moment (jQuery v1.7.2) where no such method in core | |
| // this method serializes a form into an (arguably more useful) object | |
| (function($,undefined) { | |
| $.fn.serializeObject = function() { | |
| var obj = {}; | |
| $.each( this.serializeArray(), function(i,o) { | |
| obj[o.name] = obj[o.name] === undefined ? o.value : | |
| $.isArray( obj[o.name] ) ? obj[o.name].concat( o.value ) : | |
| [ obj[o.name], o.value ]; |
| #!/bin/bash | |
| # Usage: | |
| # ./perl_unused_subs.sh project_dir | |
| # ./perl_unused_subs.sh project_dir another_project_dir_that_can_use_prev | |
| # ACK_OPTIONS="-h" && ./perl_unused_subs.sh project_dir | |
| INC_DIRS=$@ | |
| TMP_FILE="$$.pl" |