Skip to content

Instantly share code, notes, and snippets.

View hoskeri's full-sized avatar

Abhijit Hoskeri hoskeri

View GitHub Profile
FILES := $(wildcard *.c)
go: $(FILES)
echo $^
Makefile
a.c
b.c
d/e.c
#!/usr/bin/make -f
PREFIX := $(shell pwd)
DISTRIBUTION := unstable
APT_MIRROR := "http://localhost:9999/debian"
WORKDIR := /home/abhijit/tmp/qemu-image-builder-work
BOOTSTRAP_DIR := $(WORKDIR)/debootstrap
DEBOOTSTRAP := /usr/sbin/debootstrap
DEBOOTSTRAP_OPTS := --no-check-certificate --no-check-gpg --include=linux-image-amd64,openssh-server,qemu-guest-agent
DEST := $(WORKDIR)/build
@hoskeri
hoskeri / graph.py
Created October 6, 2012 00:23
Graph implementation experiments.
#!/usr/bin/python
from collections import defaultdict
import user
import random
class Graph:
def __init__(self):
self._vertices = set()
self._edges = defaultdict(list)
def add_vertex(self, data):
@hoskeri
hoskeri / songs.pk
Created March 4, 2011 04:50
Script to scrape songs.pk
#!/usr/bin/ruby
require 'nokogiri'
require 'open-uri'
Nokogiri::HTML(open(ARGV[0])).css("a").map do |link|
link.attributes["href"].value
end.find_all do |link|
link.include? "song1.php?songid=" or link.include? "song.php?songid="
end.each do |link|