Skip to content

Instantly share code, notes, and snippets.

Drew Douglass DrewDouglass

View GitHub Profile
@DrewDouglass
DrewDouglass / robot.php
Created Nov 2, 2015
Automate HTML Preview JPGs for Clients
View robot.php
<?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 Mar 24, 2016
Rsync from remote to local with custom ssh port
View rsync.sh
rsync -chavzP --stats -e "ssh -p 1999" remote@host:/path/to/files ~/Desktop/local/folder
View gist:c2dc5541094e99c72ee4
/*
vadjust plugin.
adjust top margin on vertically centered elements.
var $vadj = $('[data-vadjust="true"]');
if ($vadj.length > 0) { $vadj.vadjust(); }
*/
;(function($) {
$.fn.vadjust = function(options)
@timstl
timstl / maybe_ssl_url
Created Aug 22, 2014
maybe_ssl_url (for WordPress)
View maybe_ssl_url
function maybe_ssl_url($url)
{
if (!is_ssl()) { return $url; }
return str_ireplace('http://', 'https://', $url);
}
@erobert17
erobert17 / bootstrap-3-vert-offset-shim.css
Last active Feb 16, 2019
Adds a vertical offset top and bottom to Bootstrap 3 to be used within columns. Currently no vertical offset is available as standard in Bootstrap 3.
View bootstrap-3-vert-offset-shim.css
/*
Include this after bootstrap.css. Add class of
vert-offset-top-value or vert-offset-bottom-value
to your Bootstrap 3 default rows to prevent row content
from touching the row content above or below.
*/
/* Vertical Offset Bottom */
.vert-offset-top-12{
margin-top: 12em;
You can’t perform that action at this time.