Skip to content

Instantly share code, notes, and snippets.

Drew Douglass DrewDouglass

Block or report user

Report or block DrewDouglass

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
DrewDouglass / gist:edae8ed762f7a4e65dbe3ebf257a9b81
Created Jun 8, 2018 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:edae8ed762f7a4e65dbe3ebf257a9b81


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
DrewDouglass / alternate.js
Created Nov 8, 2017
FullCalendar alternate calendar colors.
View alternate.js
//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)) {
DrewDouglass / this-is-silly.js
Created Mar 14, 2017
FullCalendar.js put date number at bottom right of cell.
View this-is-silly.js
//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();
DrewDouglass / handlebars.js
Created Jan 24, 2017
Handlebars basic function.
View handlebars.js
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);
DrewDouglass / console.js
Created Jan 19, 2017
Avoid console errors in browsers that have no console.
View console.js
// 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;
DrewDouglass / .htaccess
Created Dec 22, 2016
redirect http and www to https and non www.
View .htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]
DrewDouglass / highlight.php
Created Oct 5, 2016
Highlight php var exports.
View highlight.php
<?php echo highlight_string("<?php\n\$data =\n" . var_export($data, true) . ";\n?>"); ?>
DrewDouglass /
Created Aug 25, 2016
Lock mac screen from command line
alias lockScreen='/System/Library/CoreServices/Menu\ Extras/ -suspend';
DrewDouglass / deploy.txt
Created Aug 17, 2016
Deploy - Pull from DEV to Local
View deploy.txt
fab stage:sitename pull && fab vagrant:sitename push
#To Sync
fab stage:sitename sync
DrewDouglass /
Created Aug 3, 2016
Batch convert JPGs to grayscale with ImageMagick
mkdir bw && for i in *.jpg; do convert $i -colorspace Gray bw/$i; done
You can’t perform that action at this time.