This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Install docker on ubuntu - | |
http://docs.docker.io/en/latest/installation/ubuntulinux/ | |
2) Download the ooni vm image - | |
$ wget http://codesurfers.net/~gsathya/ooni.tar | |
3) Import the image to docker | |
$ cat ooni.tar | docker import - ooni | |
4) Start the image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/netfilter.h> | |
#include <linux/skbuff.h> | |
#include <linux/netfilter_ipv4.h> | |
#include <linux/udp.h> | |
#include <linux/ip.h> | |
#include <linux/netdevice.h> | |
static char *interface = "eth0"; | |
/* net filter hook option struct */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local http = require("socket.http") | |
HttpRequestExperiment = {} | |
HttpRequestExperiment.__index = HttpRequestExperiment | |
function HttpRequestExperiment.create(urls) | |
local experiment = {} | |
setmetatable(experiment, HttpRequestExperiment) | |
experiment.urls = urls | |
return experiment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_array(int *array, int length) { | |
if (length == 0) { | |
return; | |
} | |
printf("["); | |
print_array_rec(array, length); | |
printf("]"); | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Experiment = {} | |
Experiment.__index = Experiment | |
function Experiment:create(urls) | |
local experiment = {} | |
setmetatable(experiment, Experiment) | |
experiment.urls = urls | |
return experiment | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section: screens | |
sathya: | |
lawn-128-61-117-4.lawn.gatech.edu: | |
end | |
section: links | |
sathya: | |
left = lawn-128-61-117-4.lawn.gatech.edu | |
lawn-128-61-117-4.lawn.gatech.edu: | |
right = sathya | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -u | |
#version number | |
VERSION=1.1.4 | |
#Maximum 24-bit integer | |
MAX=16777215 | |
#Maximum prime that statisfies p mod 4 = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from ghost import Ghost | |
import threading | |
import time | |
def read_csv(): | |
urls = [] | |
with open('test.csv', "r") as ifile: | |
for row in ifile: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def edit_distance(word1, word2): | |
len1 = len(word1) | |
len2 = len(word2) | |
table = [[0]*(len2+1) for i in range(len1+1)] | |
table2 = [[0]*(len2+1)]*(len1+1) | |
print table, "\n", table2 | |
for i in range(len1+1): | |
table[i][0] = i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<unistd.h> | |
int main (int argc, char *argv[]) | |
{ | |
FILE *fp; | |
char test_buf[30]; | |
fp = fopen("sdltest", "wb+"); | |
if (!fp) { | |
printf("Could not open file\n"); |