Skip to content

Instantly share code, notes, and snippets.

View ptasker's full-sized avatar
:fishsticks:

Peter Tasker ptasker

:fishsticks:
View GitHub Profile
@ptasker
ptasker / gist:8732886
Created January 31, 2014 14:19
Wget DL all files
wget -A pdf,jpg -m -p -E -k -K -np http://site/path/
@ptasker
ptasker / gist:8936777
Created February 11, 2014 15:16
RSYNC DL remote to local
rsync -chavzP --stats user@server.name:/remote/path ~/Documents/local/path
@ptasker
ptasker / gist:9117401
Created February 20, 2014 16:17
ChromeLogger setup
<?php
include ABSPATH . 'ChromeLogger.php';
ChromePhp::log('Hello console!');
ChromePhp::log($_SERVER);
ChromePhp::warn('something went wrong!');
@ptasker
ptasker / gist:8b6699b80e6c7163134a
Created May 29, 2014 17:36
Mantis LDAP connect
<?php
# MantisBT - a php based bugtracking system
# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@ptasker
ptasker / gist:18a1197080b8ad237d3c
Last active August 29, 2015 14:08
Jquery in Console
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type.
jQuery.noConflict();
@ptasker
ptasker / gist:5161f66c6df339450bce
Created November 12, 2014 16:57
WGET command ref
wget -E -H -k -K -p -e robots=off http://whateveryoururlis.ca
@ptasker
ptasker / wp-launch.md
Last active August 29, 2015 14:11
WordPress launch checklist
@ptasker
ptasker / grabber
Created December 23, 2014 03:01
wget mirror site
wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL
@ptasker
ptasker / gist:482629947dcfe2005acb
Last active August 29, 2015 14:20
NodeJS - Simple callback
mymodel.findOne({
'user': this.req.user,
}, function(err, data){
if (err) return next(err);
//yay! do something simple with data
});
mymodel.findOne({
'user': this.req.user,
}, function(err, data){
doSomethingWithData(data, function(err, data){
doSomethingWithELSEWithData(data, function(err, data){
doSomethingMOREWithData(data, function(err, data){
haveAnaneurysm(data, function(err, data){
//die