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 / a.rb
Created Dec 11, 2015
Bootstrap animated hamburger toggle.
View a.rb
.navbar-toggle .icon-bar:nth-of-type(2) {
top: 1px;
.navbar-toggle .icon-bar:nth-of-type(3) {
top: 2px;
.navbar-toggle .icon-bar {
position: relative;
DrewDouglass / bootstrap-custom-menu-breakpoint.css
Last active Dec 16, 2015
Snippet to change breakpoint of hamburger menu without needing to recompile SASS. Tested in bootstrap 3.
View bootstrap-custom-menu-breakpoint.css
@media (max-width: !!!YOUR BREAKPOINT!!!) {
.navbar-header {
float: none;
.navbar-left,.navbar-right {
float: none !important;
.navbar-toggle {
display: block;
DrewDouglass /
Created Dec 21, 2015
Add existing keys to remote server
cat ~/.ssh/ | ssh 'cat - >> ~/.ssh/authorized_keys'
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 / 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';
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 / bootstrap-menu-hover.css
Created May 3, 2016
Show bootstrap dropdown menus on hover instead of click.
View bootstrap-menu-hover.css
.sidebar-nav {
padding: 9px 0;
.dropdown-menu .sub-menu {
left: 100%;
position: absolute;
top: 0;
DrewDouglass / steps.txt
Created May 20, 2016
Cleaning a hacked WordPress website.
View steps.txt
Cleaning a (typical) Hacked Site
- Create backup of site
- Deactivate any unnecessary plugins. Delete any plugins and themes that are not in use.
- Update all plugins and WordPress through WP admin. We'll replace everything later, but this allows any database updates to happen.
- Download
- Download fresh copies of every plugin.
- If ACF 4.x installed, upload ACF 5.x and go through database updates (if multi-site, have to go through each site as of now). Then delete ACF 4.x and add-on plugins.
- Review wp-config.php to make sure there is no malicious code. If not confident, install fresh copy of wp-config.php with correct database information.
- Deactivate site by commenting out database info in wp-config.php
- Delete all files and folders in root directory except wp-config.php and wp-content/, and possibly any non-WP folders such as emails.
DrewDouglass / flicker-images.js
Last active Jun 9, 2016
Hide/show list of images with jQuery
View flicker-images.js
$.fn.simplestSlideShow = function(settings){
var config = {
'timeOut': 3000,
'speed': 'normal'
if (settings) $.extend(config, settings);
var $elem = $(this);
DrewDouglass / Meta Responsive Tag
Created Jul 21, 2016
Because I always forget the syntax.
View Meta Responsive Tag
<meta name="viewport" content="width=device-width, initial-scale=1">
You can’t perform that action at this time.