Skip to content

Instantly share code, notes, and snippets.

Avatar

Taylor buley

  • McNaughton Newspapers, Inc.
  • Winters, California
View GitHub Profile
View atom-events
application:open-your-keymap
application:open-your-stylesheet
autocomplete:attach
autoflow:reflow-paragraph
bookmarks:clear-bookmarks
bookmarks:jump-to-next-bookmark
bookmarks:jump-to-previous-bookmark
bookmarks:toggle-bookmark
bookmarks:view-all
check:correct-misspelling
@buley
buley / gist:9669739
Created Mar 20, 2014
How I explained promises
View gist:9669739
var ryan = function() {
console.log('hey girl');
};
for ( var x = 0; x < 10; x += 1 ) {
(function(z) { var prev = ryan;
ryan = function() {
console.log('hey guy', z);
prev();
} }(x));
}
View gist:9752414
You appear to be advocating a new:
You appear to believe that:
Unfortunately, your idea (has/lacks):
The following philosophical objections apply:
View gist:3f2b94c86bca059f8c5e
curl -IL "http://www.nytimes.com/2014/05/11/opinion/sunday/kristof-whats-so-scary-about-smart-girls.html?smid=tw-share&smv1" | grep HTTP
HTTP/1.1 303 See Other
HTTP/1.1 302 Found
HTTP/1.1 303 See Other
HTTP/1.1 302 Found
HTTP/1.1 303 See Other
HTTP/1.1 302 Found
HTTP/1.1 303 See Other
HTTP/1.1 302 Found
HTTP/1.1 303 See Other
@buley
buley / gist:9edc099d51d298161d48
Created Jul 14, 2014
virtualizing pidora on os x
View gist:9edc099d51d298161d48
brew install qemu
cd /usr/local/Cellar/qemu/1.7.0/bin
wget http://xecdesign.com/downloads/linux-qemu/kernel-qemu
./qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda ~/Downloads/Pidora-2014-R2-1/Pidora-2014-R2-1.img
View gist:f1c947c491dd91d47313
### Keybase proof
I hereby claim:
* I am buley on github.
* I am buley (https://keybase.io/buley) on keybase.
* I have a public key whose fingerprint is 84EB F8DF F47B D375 354A 1294 F3CA F861 1DC3 1DE9
To claim this, I am signing this object:
@buley
buley / evil.js
Last active Aug 29, 2015
self-expanding iframe
View evil.js
window.parent.document.body.style.height = window.parent.innerHeight + 'px';
window.parent.document.getElementsByTagName('iframe')[0].setAttribute('height', window.parent.document.body.clientHeight +'px');
window.parent.document.getElementsByTagName('iframe')[0].setAttribute('width', window.parent.document.body.clientWidth + 'px');
window.document.getElementById("application-ad-handle").style.margin = ((document.body.clientHeight - window.document.getElementById("application-ad-handle").clientHeight)/2) + 'px auto 0 auto';
View centos-python2.7.5-install.sh
#!/bin/bash
yum groupinstall -y "Development tools"
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel
cd /usr/local/src/
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
tar xf Python-2.7.5.tar.bz2
cd Python-2.7.5
./configure --prefix=/usr/local
make && make altinstall
cd ..
View gist:e84408d262ef2c138ddb
[root@machine ~]# systemctl status firewalld -l
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: active (running) since Sun 2014-12-21 21:11:18 UTC; 20s ago
Main PID: 14707 (firewalld)
CGroup: /system.slice/firewalld.service
└─14707 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Dec 21 21:11:18 machine systemd[1]: Starting firewalld - dynamic firewall daemon...
Dec 21 21:11:18 machine systemd[1]: Started firewalld - dynamic firewall daemon.
View gist:eca47cda4979c74174c6
var currentTime = Date.now(),
dbName = "bugtest_" + currentTime,
indexes = [
{
name: "by_title",
path: "title",
unique: false
},
{