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 | |
class ParseShell extends AppShell | |
{ | |
function main() | |
{ | |
$this->stdout->styles( 'pass', [ 'text' => 'green' ] ); | |
$this->stdout->styles( 'fail', [ 'text' => 'red' ] ); |
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
def run_phpspec | |
file = nil | |
unless ARGV[1].nil? | |
file = "spec/#{ARGV[1]}Spec.php" | |
end | |
command = "`which phpspec` run --format=pretty --no-code-generation -vv #{file}"; |
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o pipefail | |
filename=$1 | |
string=$2 | |
barcode -E -b "${string}" -o ${filename}.eps | |
convert ${filename}.eps ${filename}.jpg |
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
$.fn.parallax = function( options ) { | |
if ( typeof options.opacity === 'undefined' ) options.opacity = false; | |
if ( typeof options.resistance === 'undefined' ) options.resistance = 1; | |
// determine the direction of the parallax thingy | |
if ( typeof options.inverse === 'undefined' ) options.inverse = true; | |
var element = $( this ); |
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
$.fn.sticky = function( options ){ | |
console.error( options ); | |
var element = $( this ); | |
var breakpoint = options.breakpoint; | |
var container = $( options.container ); | |
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
.col-1 | |
width: 28px | |
.col-2 | |
width: 56px | |
.col-3 | |
width: 84px | |
.col-4 |
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
*, *:before, *:after { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
* { | |
margin: 0; | |
padding: 0; | |
} |
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
#!/usr/local/php5/bin/php | |
<?php | |
function testConnection() | |
{ | |
$connected = @fsockopen("www.google.com", 80); | |
$response = false; | |
if ($connected) { |
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 | |
FILE=$1 | |
if [ -d /tmp/gifify ] mkdir /tmp/gifify | |
ffmpeg -i $FILE -r 10 -f image2 /tmp/gifify/%03d.png | |
convert -delay 1x10 `seq -f /tmp/gifify/%03g.png 1 13` -coalesce -layers OptimizeTransparency animation.gif | |
rm /tmp/gifify/*.png |
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
wrapSelects = function() { | |
$('form.awesome select:not(.is-wrapped)') | |
.addClass('is-wrapped') | |
.wrap('<div class="custom dropdown select" />') | |
.after('<span class="selector"></span>'); | |
} | |
$(wrapSelects); |