Skip to content

Instantly share code, notes, and snippets.

View L1fescape's full-sized avatar

Andrew Kennedy L1fescape

View GitHub Profile
.popup {
position:fixed;
color: #4c3327;
font-family: Helvetica, Arial, sans-serif;
top:0;
left:0;
width:100%;
height:100%;
max-width:100%;
max-height:100%;
@L1fescape
L1fescape / evills
Created April 1, 2014 22:06 — forked from Eugeny/evills
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
__all__ = ["transform"]
__version__ = '0.3'
__author__ = 'Christoph Burgmer <cburgmer@ira.uka.de>'
__url__ = 'http://github.com/cburgmer/upsidedown'
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@L1fescape
L1fescape / auto_hotkey
Created April 27, 2014 15:59
AutoHotkey Bindings
; Map ctrl-backspace to delete (similar to MacOS)
^BS::
Send {DEL}
return
; Map Caps lock to escape
Capslock::Esc
; Toggles default audio device in Control Panel (switches between headset and speakers).
!s::
@L1fescape
L1fescape / united_flighttime.bash
Last active August 29, 2015 14:01
Get the the status of the United Airlines flight you're currently on, provided your flight has wifi (just need to be connected, not paying for it). Implementations in node and curl.
curl 'https://www.unitedwifi.com/payment/ajax/notification.do' --data 'actionkey=FLIGHT_TIME_NOTIFICATIONS' --compressed
# [{
# "class":"com.bluebird.business.flightimebar.FlightimeBarResponse",
# "destinationIATA":"MCO",
# "eventType":"FLIGHTTIMEBAR",
# "flightETA":"8:58PM",
# "flightRunningStatus":89,
# "flightStatusText":"0h 33m with United Wi-Fi!",
# "flightTotalDuration":332,
# "markers":[{
@L1fescape
L1fescape / alert.js
Created May 29, 2014 20:00
Helper files for google's xss game https://xss-game.appspot.com/
alert(1);
// npm install request
var request = require('request'),
redirectCount = 0;
function printRedirects(site) {
request(site, {followRedirect: false}, function (error, response, body) {
if (error){
console.log(error);
return;
}
function count_redir {
curl -L -I -D - -o /dev/null $1 | awk 'BEGIN { redir = 0; status = 200; } tolower($1) ~ /http/ { redir=redir+1; status=$2 } tolower($1) ~ /location:/ { print redir, status, $2 } END { print "Completed, with ", redir-1, "redirects. Final result: ", status }'
}
@L1fescape
L1fescape / gist:2e58a1ad1a8753c26d5a
Created June 23, 2014 21:37
All keys in mongodb db. Not very efficient.
var keys = [];
db.domains.find().forEach(function(doc) {
for( key in doc ){
if( keys.indexOf(key) === -1 ){
keys.push(key);
}
}
});
print(keys);
@L1fescape
L1fescape / gulpfile.js
Last active August 29, 2015 14:05
Seperate Gulp browserify and watchify tasks
'use strict';
var gulp = require('gulp');
var browserify = require('browserify');
var watchify = require('watchify');
var source = require('vinyl-source-stream');
var notify = require('gulp-notify');
// Helper functions
function handleErrors(){
var args = Array.prototype.slice.call(arguments);