Skip to content

Instantly share code, notes, and snippets.

@vbajpai
vbajpai / watch-word-limit
Created March 31, 2013 12:03
watch word limit on your latex document.
$ watch -d "detex index.tex | wc -w"
@vbajpai
vbajpai / toc-markdown
Created March 6, 2013 19:08
automatically create table of contents for a markdown post.
$ npm install -g doctoc
$ doctoc $FILE.md
@vbajpai
vbajpai / git-purge-branch
Created February 21, 2013 12:54
delete a git branch and all its associated history.
[master] $ git branch -D topic
[master] $ git reflog expire --expire=now --all
[master] $ git gc --aggressive --prune=now
[master] $ git repack -a -d -l
@vbajpai
vbajpai / README.md
Last active December 12, 2015 06:39
IPv4 and IPv6 aggregation clouds

This is the plot of the IPv4 and IPv6 aggregation cloud for top 100 dual stacked global services

@vbajpai
vbajpai / README.md
Last active December 10, 2015 19:38

OpenWRT mips in QEMU

This is a OpenWRT mips malta (big endian) image for QEMU. The image was generated using OpenWRT buildroot as described in (1). However the build process is only needed to generate the image, which can be used standalone on any host machine. I am putting this image as a gist to allow it to be used from here.

(1) http://fosiao.com/content/running-openwrt-under-qemu

@vbajpai
vbajpai / opkgclean.sh
Last active March 5, 2024 17:06
If opkg runs out of space, it will not remove the files it was installing. Run this custom script in order recover the space by removing these files and the installed dependencies.
#!/bin/sh
#takes one argument/parameter: the name of the package which didn't install correctly and should be removed along with its dependencies
#do opkg update first
#example: ./opkgremovepartlyinstalledpackage.sh pulseaudio-daemon
#get list of all packages that would be installed along with package x
opkg update
PACKAGES=`opkg --force-space --noaction install $1 | grep http | cut -f 2 -d ' ' | sed 's/.$//'`
for i in $PACKAGES
do
@vbajpai
vbajpai / README.md
Last active December 10, 2015 15:19
OpenWRT on TP-Link TLWR703N

OpenWRT on TP-Link TLWR703N

The image is a nightly build of OpenWRT, codenamed Barrier Breaker. The image was built on Jan 3, 2013 and was successfully flashed on TLWR703N router with firmware version v1.6.

The image was downloaded from OpenWRT downloads page (1). I assume the nightly builds are not archived but replaced each day with a newer image. Therefore I am putting a copy of the image I used here.

@vbajpai
vbajpai / homebrew
Created September 10, 2012 20:49
My Homebrews
ack
atk
autoconf
autojump
automake
bash
binutils
c-ares
cairo
cmake
@vbajpai
vbajpai / eduroam
Created August 24, 2012 12:56
netcfg configuration for eduroam
CONNECTION='wireless'
INTERFACE='wlan0'
SCAN='no'
SECURITY='wpa-config'
ESSID='eduroam'
IP='dhcp'
TIMEOUT='30'
WPA_CONF='/etc/wpa_supplicant.conf'
@vbajpai
vbajpai / JACOBS
Created August 24, 2012 12:49
netcfg configuration for JACOBS Public Access Point
CONNECTION='wireless'
DESCRIPTION='A simple opened wireless connection'
INTERFACE='wlan0'
SECURITY='none'
ESSID='JACOBS'
IP='dhcp'