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
for f in *\ *; do mv "$f" "${f// /_}"; done |
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
mkdir bw && for i in *.jpg; do convert $i -colorspace Gray bw/$i; done |
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
fab stage:sitename pull && fab vagrant:sitename push | |
#To Sync | |
fab stage:sitename sync |
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
alias lockScreen='/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend'; |
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 echo highlight_string("<?php\n\$data =\n" . var_export($data, true) . ";\n?>"); ?> |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] | |
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://example.com/$1 [R,L] |
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
// Avoid `console` errors in browsers that lack a console. | |
if (!(window.console && console.log)) { | |
(function() { | |
var noop = function() {}; | |
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn']; | |
var length = methods.length; | |
var console = window.console = {}; | |
while (length--) { | |
console[methods[length]] = noop; | |
} |
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
function templateLoad(templateName, dataSource, htmlNode, callback) { | |
var templateFile = 'partials/' + templateName + '.html'; | |
jQuery.get(templateFile, function(template) { | |
var renderedTemplate = Handlebars.compile(template); | |
var result = renderedTemplate(dataSource); | |
//jQuery(htmlNode).replaceWith(result); | |
jQuery(htmlNode).append(result); |
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
//Fix for FullCalendar not having | |
//the most basic option of positioning | |
//the date number. | |
$(".fc-content-skeleton").each(function(index, el){ | |
var $this = $(this); | |
var calHead = $this.find("thead").html(); | |
$this.find("table").append("<tfoot>"+calHead+"</tfoot>"); | |
}); |
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
//Globla variable outside of all functions | |
var altColor = 1; | |
//Global function | |
function isEven(n) { | |
return n % 2 == 0; | |
} | |
//This goes inside the full calendar call | |
eventRender: function(event, element) { | |
if(isEven(altColor)) { |