Skip to content

Instantly share code, notes, and snippets.

View DrewDouglass's full-sized avatar
🤠

Drew Douglass DrewDouglass

🤠
View GitHub Profile
sudo nano /boot/config.txt
#edit or add hdmi_drive to hdmi_drive=2
@DrewDouglass
DrewDouglass / smoothscroll.js
Created November 2, 2015 16:31
Smooth Scrolling for #links
//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;
@DrewDouglass
DrewDouglass / robot.php
Created November 2, 2015 14:54
Automate HTML Preview JPGs for Clients
<?php
//While <= number of files to create
$count = 1;
while($count <= 18) {
if($count === 1) {
$filename = 'index.html';
}
else {
$filename = $count.'.html';
@DrewDouglass
DrewDouglass / rsync.sh
Last active June 9, 2020 18:53
Rsync from remote to local with custom ssh port
# Simple with recursion and info/progress
rsync -havzP --stats remote@host:/your/path ~/Desktop/your/folder
#Custom Port
rsync -chavzP --stats -e "ssh -p 1999" remote@host:/path/to/files ~/Desktop/local/folder
<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 / custom-social-links.php
Created September 15, 2015 21:36
Drop it in functions.php, call it with the social network desired, and echo it in an href tag.
@DrewDouglass
DrewDouglass / gist:bedeaa2a6e1bc569619c
Created April 29, 2015 22:13
Get the weather in your shell
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"';
}
@DrewDouglass
DrewDouglass / gist:9241132b1010005c36f1
Created April 20, 2015 16:10
Alias for ImageOptim CLI
alias pngs='imageOptim --directory ~/Desktop/pngs/ -a'
@DrewDouglass
DrewDouglass / gist:6a963c69fdb86a05d1d8
Created April 20, 2015 16:00
Compress GIFs using Gifsicle
gifsicle -O3 default.gif -o compressed.gif
@DrewDouglass
DrewDouglass / gist:dafba0e55a74c11c6f5b
Created April 20, 2015 15:49
Compress JPG using ImageMagick
convert AtomicDust.jpg -strip -quality 85% -interlace Plane compressed.jpg