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
View jquery.easy-gallery-focus.js
DrewDouglass / js_border_elems.js
Created Nov 16, 2012
JavaSript Outline All HTML Elements
View js_border_elems.js
javascript:elem=document.getElementById("dev-outliner");if(elem){elem.parentNode.removeChild(elem);}else{document.body.insertAdjacentHTML('beforeEnd', '<style id="dev-outliner">*{border:1px rgba(255,0,255,0.4) solid !important;}</style>');}
DrewDouglass / gist:dafba0e55a74c11c6f5b
Created Apr 20, 2015
Compress JPG using ImageMagick
View gist:dafba0e55a74c11c6f5b
convert AtomicDust.jpg -strip -quality 85% -interlace Plane compressed.jpg
DrewDouglass / gist:6a963c69fdb86a05d1d8
Created Apr 20, 2015
Compress GIFs using Gifsicle
View gist:6a963c69fdb86a05d1d8
gifsicle -O3 default.gif -o compressed.gif
View gist:9241132b1010005c36f1
alias pngs='imageOptim --directory ~/Desktop/pngs/ -a'
DrewDouglass / gist:bedeaa2a6e1bc569619c
Created Apr 29, 2015
Get the weather in your shell
View gist:bedeaa2a6e1bc569619c
weather() {
echo Your Location:
curl -s "${@:-YOURZIPCODE}" | perl -ne 's/&amp;deg;/°/g;/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"';
DrewDouglass / custom-social-links.php
Created Sep 15, 2015
Drop it in functions.php, call it with the social network desired, and echo it in an href tag.
View custom-social-links.php
View arrow.css
<a class="tab" href="#">Show All</a>
.tab {
text-transform: uppercase;
text-decoration: none;
font-weight: $fw-medium;
DrewDouglass /
Last active Mar 24, 2016
Rsync from remote to local with custom ssh port
rsync -chavzP --stats -e "ssh -p 1999" remote@host:/path/to/files ~/Desktop/local/folder
DrewDouglass / robot.php
Created Nov 2, 2015
Automate HTML Preview JPGs for Clients
View robot.php
//While <= number of files to create
$count = 1;
while($count <= 18) {
if($count === 1) {
$filename = 'index.html';
else {
$filename = $count.'.html';
You can’t perform that action at this time.