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
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
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
DrewDouglass / gist:bedeaa2a6e1bc569619c
Created Apr 29, 2015
Get the weather in your shell
View gist:bedeaa2a6e1bc569619c
weather() {
echo Your Location:
curl -s "http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=${@:-YOURZIPCODE}" | perl -ne 's/&amp;deg;/°/g;/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"';
}
View jquery.easy-gallery-focus.js
@DrewDouglass
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;
font-size:14px;
color:$black;
text-decoration: none;
font-weight: $fw-medium;
padding-bottom:10px;
padding-left:10px;
@DrewDouglass
DrewDouglass / smoothscroll.js
Created Nov 2, 2015
Smooth Scrolling for #links
View smoothscroll.js
//Smooth scrolling for #links
var $root = $('html, body');
$('a').click(function() {
var href = $.attr(this, 'href');
$root.animate({
scrollTop: $(href).offset().top
}, 1000, function () {
window.location.hash = href;
});
return false;
View Enable HDMI audio for Raspberry Pi
sudo nano /boot/config.txt
#edit or add hdmi_drive to hdmi_drive=2
@DrewDouglass
DrewDouglass / wordpresslatest.sh
Created Dec 10, 2015
Grab latest WP version, extract, and copy to document root. Gist sent from Command line
View wordpresslatest.sh
wget http://wordpress.org/latest.tar.gz && tar -xzvf latest.tar.gz && cp -r wordpress/* . && rm -rf wordpress
You can’t perform that action at this time.