Skip to content

Instantly share code, notes, and snippets.

View buley's full-sized avatar
🤑

Tay buley

🤑
View GitHub Profile
@buley
buley / atom-events
Created February 28, 2014 03:32 — forked from ardcore/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 March 20, 2014 17:48
How I explained promises
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));
}
@buley
buley / gist:9752414
Last active August 29, 2015 13:57 — forked from munificent/gist:9749671
You appear to be advocating a new:
You appear to believe that:
Unfortunately, your idea (has/lacks):
The following philosophical objections apply:
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 July 14, 2014 23:39
virtualizing pidora on os x
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
### 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 August 29, 2015 14:04
self-expanding iframe
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';
#!/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 ..
[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.
var currentTime = Date.now(),
dbName = "bugtest_" + currentTime,
indexes = [
{
name: "by_title",
path: "title",
unique: false
},
{