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
# Add this file to your Sublime Packages/User folder | |
import sublime | |
import sublime_plugin | |
import re | |
import os | |
class FindInFilesGotoCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
view = self.view | |
if view.name() == "Find Results": |
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
export WIBBLE=woo |
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 | |
# | |
# Source this file in your ~/.bash_profile or interactive startup file. | |
# This is done like so: | |
# | |
# [[ -s "$HOME/.rvm/contrib/ps1_functions" ]] && | |
# source "$HOME/.rvm/contrib/ps1_functions" | |
# | |
# Then in order to set your prompt you simply do the following for example |
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
// Returns TRUE when time() is greater than $datatime_string | |
function time_cop($datetime_string = '3/27/2013 6AM') | |
{ | |
if (empty($datetime_string)) { | |
return FALSE; | |
} | |
return time() >= strtotime($datetime_string); | |
} |
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
var $collapseToggle = $('.js_collapse_toggle'), | |
$collapseContent = $('.js_collapse_content'); | |
$collapseContent.hide(); | |
$collapseToggle.on('click', function(event) { | |
event.preventDefault(); | |
$(this).toggleClass('collapse_active'); | |
$($(this).attr('href')+'.js_collapse_content').stop(true, false).slideToggle(); | |
}); |
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
$('.js-loadvideo').on('click', function(e){ | |
e.preventDefault(); | |
var $vid_id = $(this).attr('href').split('v=')[1]; | |
var width = $(this).attr('data-width'); | |
var height = $(this).attr('data-height'); | |
var $video = '<iframe width="'+width+'" height="'+height+'" src="//www.youtube-nocookie.com/embed/'+ $vid_id +'?rel=0&showinfo=0&wmode=opaque&autoplay=1&modestbranding=1" frameborder="0" allowfullscreen></iframe>'; | |
$(this).parent('.playoverlay').html($video); | |
return false; | |
}); |
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 | |
function array_vals_sorter($array, $val_key, $order = 'asc') { | |
$sorter = array(); | |
foreach ($array as $key => $row) | |
{ | |
$sorter[$key] = $row[$val_key]; | |
} | |
array_multisort($sorter, SORT_ASC, $array); | |
if ($order != 'asc') $array = array_reverse($array,TRUE); |
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
.smooth_animation { -webkit-transform: translate3d(0,0,0); -moz-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); transform: translate3d(0,0,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
# update fuel to latest migration | |
php index.php fuel/migrate/latest |