#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| /** | |
| * $.parseParams - parse query string paramaters into an object. | |
| */ | |
| (function($) { | |
| var re = /([^&=]+)=?([^&]*)/g; | |
| var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
| var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
| $.parseParams = function(query) { | |
| var params = {}, e; | |
| while ( e = re.exec(query) ) { |
| <?php | |
| /* | |
| * Example code showing how to hook WordPress to add fields to the taxonomny term edit screen. | |
| * | |
| * This example is meant to show how, not to be a drop in example. | |
| * | |
| * This example was written in response to this question: | |
| * | |
| * http://lists.automattic.com/pipermail/wp-hackers/2010-August/033671.html | |
| * |
| source s_nginx_20 { pipe("/srv/logs/access.log" program_override("nginx-access-log")); }; | |
| source s_nginx_21 { pipe("/srv/logs/error.log" program_override("nginx-error-log")); }; | |
| filter f_nginx_20 { match("nginx-access-log" value("PROGRAM")); }; | |
| filter f_nginx_21 { match("nginx-error-log" value("PROGRAM")); }; | |
| destination d_remote { tcp("central.syslog", port(514)); }; | |
| log { source(s_nginx_20); filter(f_nginx_20); destination(d_messages); }; | |
| log { source(s_nginx_21); filter(f_nginx_21); destination(d_messages); }; |
| // Turns out this function already exists in Sass: mix(fg, bg, %) (http://d.pr/mGqa) | |
| // Alpha blending | |
| @function blend($bg, $fg) { | |
| $r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg)); | |
| $g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg)); | |
| $b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg)); |
| /** | |
| * BxSlider | |
| */ | |
| !function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};t.fn.bxSlider=function(n){if(0==this.length)return this;if(this.lengt |
| #!/bin/bash | |
| # args | |
| MSG=${1-'deploy from git'} | |
| BRANCH=${2-'trunk'} | |
| # paths | |
| SRC_DIR=$(git rev-parse --show-toplevel) | |
| DIR_NAME=$(basename $SRC_DIR) | |
| DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH |
| <?php | |
| /** | |
| * Send debug code to the Javascript console | |
| */ | |
| function debug_to_console($data) { | |
| if(is_array($data) || is_object($data)) | |
| { | |
| echo("<script>console.log('PHP: ".json_encode($data)."');</script>"); | |
| } else { | |
| echo("<script>console.log('PHP: ".$data."');</script>"); |
| ''' | |
| This is a module that defines some helper classes and functions for | |
| expiring groups of related keys at the same time. | |
| Written July 1-2, 2013 by Josiah Carlson | |
| Released into the public domain | |
| ''' | |
| import time |