This file contains 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 LookupTableBehavior extends ModelBehavior{ | |
/** | |
* Finds and returns the data or inserts it to the database | |
* | |
* @param Model $model | |
* @param string $value | |
* @param string $field |
This file contains 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
project_path = "" | |
http_path = "/" | |
css_dir = "webroot/css" | |
sass_dir = "webroot/scss" | |
images_dir = "webroot/img" | |
javascripts_dir = "webroot/js" | |
http_generated_images_path = "/img" |
This file contains 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); |
This file contains 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 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 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 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 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 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 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 |
OlderNewer