Skip to content

Instantly share code, notes, and snippets.

View navinpai's full-sized avatar

Navin Pai navinpai

View GitHub Profile
@navinpai
navinpai / README
Created December 7, 2013 05:24
Cicada 3301 2013 Server Implementation (From http://pastebin.com/CrRvGrkT)
In the programming language of your choice build a TCP server
that implements the protocol below. The server code must be
written by you and you alone, although you are free to use any
modules or libraries publicly available for the selected
programming language.
Once you have done this, make it accessible as a Tor hidden
service. Then provide us with the onion address and port
via a GPG-encrypted email to this address.
@navinpai
navinpai / shell_shortcuts.txt
Created November 24, 2013 15:07
Important shell commands/hacks/tips... From http://www.techbar.me/linux-shell-tips/
Send process to background:
Ctrl + z
Move process to foreground:
fg
Generate random hex number where n is number of characters:
@navinpai
navinpai / newride.py
Last active December 28, 2015 17:29
DARP
from operator import itemgetter
import scipy.sparse.csgraph as csgraph
import numpy as np
import itertools
import random
requests=[]
allrequests=[]
predecessors=[]
@navinpai
navinpai / facebook.py
Created October 17, 2013 10:12
post thanks to everyone on FB who wishes on birthday. Script by Taz.
import requests
import datetime
import time
from random import randrange
TOKEN = "" # add your access token here, with publish_stream permission
def main():
todays_start_unixtimestamp = int(time.mktime((datetime.datetime(datetime.date.today().year, datetime.date.today().month, datetime.date.today().day, 0, 0, 0)).timetuple()))
@navinpai
navinpai / .conkyrc
Last active December 24, 2015 02:59
Default Conkyrc on #!
#MINIMAL AND HORIZONTAL BAR
#http://crunchbang.org/forums/viewtopic.php?id=59&p=99
# minfo conky -- for the minimalist!
#
# minimalist conky is a horizontal style config.
# configure your desktop margins so conky is always visible.
#
# made from scratch using the conky wiki as reference.
#
@navinpai
navinpai / download_sourcetree.py
Last active December 23, 2015 07:29
Downloading pintOS from the vt.edu sourcetree through WayBackMachine
from bs4 import BeautifulSoup
import requests
import os
import re
def downloader(filepage):
getdownload=[]
print "\n\n\n\nCURRENT"+os.getcwd()
for link in BeautifulSoup(requests.get(filepage).text).findAll('a',{'id':"download"}):
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@navinpai
navinpai / getimages.py
Last active December 19, 2015 08:29
Script to get all images from gags247.com. The site has open indexes. Open indexes are NEVER a good thing :|
from bs4 import BeautifulSoup
import requests
def getimages(parentlink):
for link in BeautifulSoup(requests.get(parentlink).text).find_all('a'):
if(link.get('href')[0]!='/'):
if(link.get('href')[-1]=='/'):
getimages(parentlink+link.get('href'))
else:
with open(link.get('href'), 'wb') as f:
for chunk in requests.get(parentlink+link.get('href')).iter_content():

AngularJS-Learning

A bunch of links to blog posts, articles, videos, etc for learning AngularJS. This list is in its early stages. Feel free to submit a pull request if you have some links/resources to add. Also, I try to verify that the articles below have some real content (i.e. aren't 2 paragraph blog posts with little information) to ensure I'm not listing "fluff" pieces. If you have an idea for a better way to organize these links, please let me know. As I find similar posts in the "General Topics" section, I will break them out into their own categories.

Books

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result