Skip to content

Instantly share code, notes, and snippets.

View sharjeelaziz's full-sized avatar

Sharjeel Aziz sharjeelaziz

View GitHub Profile
echo 'events {
worker_connections 1024;
}
error_log /usr/local/Cellar/nginx/1.5.8/error.log;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#!/usr/bin/env ruby
require 'net/http'
require 'net/https'
BASEDIR = '/etc'
LAST_IP_FILE = "#{BASEDIR}/tunnelbroker.lastip"
# for debugging.
BE_VERBOSE = false
@sharjeelaziz
sharjeelaziz / tunnelbroker-net.sh
Created June 6, 2012 19:00 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
@sharjeelaziz
sharjeelaziz / kill_attrs.py
Created June 7, 2011 20:48 — forked from bradmontgomery/kill_attrs.py
A way to remove all HTML attributes with BeautifulSoup
from BeautifulSoup import BeautifulSoup
def _remove_attrs(soup):
for tag in soup.findAll(True):
tag.attrs = None
return soup
def example():
doc = '<html><head><title>test</title></head><body id="foo" onload="whatever"><p class="whatever">junk</p><div style="background: yellow;" id="foo" class="blah">blah</div></body></html>'