This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # | |
| # Aliases | |
| # | |
| alias ll="ls -la" | |
| alias sw="sass --watch --debug-info sass:css" | |
| alias swp="sass --watch --style compressed sass:css" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function parse_video_link($link){ | |
| if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $link, $match)) { | |
| $video_id = $match[1]; | |
| return array("video" => "youtube", "videoID" => $video_id); | |
| } | |
| $regexstr = '~ | |
| # Match Vimeo link and embed code | |
| (?:<iframe [^>]*src=")? # If iframe match up to first quote of src | |
| (?: # Group vimeo url | |
| https?:\/\/ # Either http or https |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Modernizr.addTest('canvasblending', function() { | |
| if (Modernizr.canvas === false) return false; | |
| var canvas = document.createElement('canvas'); | |
| var ctx = canvas.getContext('2d'); | |
| ctx.globalCompositeOperation = 'screen'; | |
| return ctx.globalCompositeOperation === 'screen'; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tempID = window.setTimeout(function() {}, 0); | |
| while (tempID--) { | |
| window.clearTimeout(tempID); // will do nothing if no timeout with tempID is present | |
| } | |
| tempID = window.setInterval(function() {}, 0); | |
| while (tempID--) { | |
| window.clearInterval(tempID); // will do nothing if no interval with tempID is present | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| [ | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+o", "super+shift+alt+x"], "command": "insert_snippet", "args": {"name": "Packages/User/bcxo.sublime-snippet"}}, | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+x"], "command": "insert_snippet", "args": {"name": "Packages/User/bcx.sublime-snippet"}}, | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+o", "super+shift+alt+s"], "command": "insert_snippet", "args": {"name": "Packages/User/bcso.sublime-snippet"}}, | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+s"], "command": "insert_snippet", "args": {"name": "Packages/User/bcs.sublime-snippet"}}, | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+o", "super+shift+alt+m"], "command": "insert_snippet", "args": {"name": "Packages/User/bcmo.sublime-snippet"}}, | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+m"], "command": "insert_snippet", "args": {"name": "Packages/User/bcm.sublime-snippet"}}, | |
| { "keys": ["super+shift+alt+b", "super+shift+alt+o", "super+shift+alt+l"], "command": "insert_snippet", "args": {"n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function cascade_values(){ | |
| for ($i = 0; $i < func_num_args(); $i++) { | |
| $val = func_get_arg($i); | |
| if(!empty($val)){ | |
| return $val; | |
| } | |
| } | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *~ | |
| /rsync* | |
| .DS_Store | |
| .svn | |
| .cvs | |
| *.bak | |
| *.swp | |
| Thumbs.db | |
| .sass-cache/ | |
| *.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){parts = location.host.split('.'); last = parts.pop(); replace = last == 'dev' ? 'com' : 'dev'; parts.push(replace); location.host= parts.join('.'); })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cc_spaces(txt){ | |
| // rip all non digits from string | |
| txt = txt.toString().replace(/[^\d]/g, ''); | |
| format = /(\d{1,4})/g; | |
| // test for amex. | |
| if (null !== txt.match(/^3[47]/)) { | |
| format = /(\d{1,4})(\d{1,6})?(\d{1,5})?/; |