Skip to content

Instantly share code, notes, and snippets.

View Asparagirl's full-sized avatar

Brooke Schreier Ganz Asparagirl

  • Mill Valley, California
View GitHub Profile
@shawndumas
shawndumas / soundex.js
Last active February 21, 2024 11:47
Soundex in JavaScript
var soundex = function (s) {
var a = s.toLowerCase().split(''),
f = a.shift(),
r = '',
codes = {
a: '', e: '', i: '', o: '', u: '',
b: 1, f: 1, p: 1, v: 1,
c: 2, g: 2, j: 2, k: 2, q: 2, s: 2, x: 2, z: 2,
d: 3, t: 3,
l: 4,
@coderjo
coderjo / ustream.py
Created December 12, 2011 20:33
simple script to build the proper rtmpdump command line for a live ustream feed
#!/usr/bin/env python
flashVer = "WIN 10,3,183,7"
from HTMLParser import HTMLParser
from pyamf.remoting.client import RemotingService
import urllib2, sys
from time import time
# first we need to define a very basic html parser to get two meta properties
@boucher
boucher / gist:1750375
Created February 6, 2012 07:09 — forked from siddarth/gist:1379745
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
<html>
<head>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" type="text/css">
<style type="text/css">
code { display: block; }
pre { color: green; }
</style>
</head>
<body>
<h1>Balanced Sample - Collect Bank Account Information</h1>
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@abeppu
abeppu / feelbetter.js
Last active February 6, 2021 19:06
Implementation of @FeelBetterBot
var Twit = require("twit");
var config = require('./oauthconfig');
console.log("config:");
console.log(config);
var T = new Twit({
consumer_key: config.consumer_key,
consumer_secret: config.consumer_secret,
access_token: config.access_token,
@coderjo
coderjo / README
Last active December 29, 2015 12:29
ArchiveTeam project worker EC2 user-data script.
This is a user-data script for starting up ec2 instances to run an ArchiveTeam project downloader.
steps:
1. save the file to your drive.
2. change where it says YOURNICKHERE to the name you want to show up on the tracker.
3. pick the 32-bit Debian Wheezy 7.2 AMI for the region you plan to use.
4. put the ENTIRE contents of your file as the user-data field.
- If you are using the command-line ec2 tools, you can say --user-data-file YOURFILENAME
- If you are using the web console, on page 3 ("Configure Instance"), expand the "Advanced Details" section and either paste the contents into the "user data" box, or pick "as file" then click browse to select your file.
5. finish setting up your instance. Don't forget to configure a security group to allow you SSH access.
@tkh44
tkh44 / FileController.js
Last active March 10, 2020 09:04
Simple file upload for sails.js
module.exports = {
get: function (req, res) {
res.sendfile(req.path.substr(1));
},
_config: {
rest: false,
shortcuts: false
}
};

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file