Skip to content

Instantly share code, notes, and snippets.

@boxysean
boxysean / Main.java
Created July 12, 2013 20:48
Solution to UVA 10420
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Map;
import java.util.TreeMap;
public class Main {
public static void main(String args[]) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
@boxysean
boxysean / A.java
Created July 12, 2013 19:57
Class 02 solutions
import java.util.PriorityQueue;
import java.util.Scanner;
public class A {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
while (true) {
@boxysean
boxysean / BitmaskDemo.java
Created July 11, 2013 16:07
Demonstration files csci-ua.0380-001 Class 02 Data Structures
package class02;
import java.util.Stack;
//note: for example usage of BitSet, see ch5_06_primes.java
class BitmaskDemo {
private static int setBit(int S, int j) { return S | (1 << j); }
private static int isOn(int S, int j) { return S & (1 << j); }
@boxysean
boxysean / cameras.csv
Created June 26, 2013 14:49
Script used to capture stills from ITP cameras. When added to a crontab, it can be run as often as you'd like!
lobby http://128.122.151.22/mjpg/video.mjpg
classroom20closeup http://128.122.151.188/mjpg/video.mjpg
jroom http://128.122.151.200/mjpg/video.mjpg
shop http://128.122.151.221/mjpg/video.mjpg
classroom20 http://128.122.151.227/mjpg/video.mjpg
#include "Tlc5940.h"
int delayTime = 1;
int analogPin[8] = {
A0, A1, A2, A3, A4, A5, 2, 1};
char cmd;
int edgeLength = 2;
int layMin = 3;
@boxysean
boxysean / Outernet-install-script.txt
Created May 1, 2013 00:26
Let it be known, this is how you set up a GuruPlug to run the Outernet stack
install git, git-core
setup ssh keys with github
install sys-rc-conf
disable lighttpd and stop service
install apache2
remove apache2-mpm-prefork and install apache2-mpm-worker
apt-get upgrade
mark mysql-client-5.0 as upgradable... and then let them all upgrade
@boxysean
boxysean / named.conf.local
Last active June 11, 2020 15:49
bind for outernet
zone "outernet" {
type master;
file "/etc/bind/zones/outernet.db";
};
zone "56.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.56.168.192.in-addr.arpa";
};
hosts = localhost
auth_bind = yes
auth_bind_userdn = cn=%n, ou=people, dc=outerwebs, dc=nodomain
ldap_version = 3
base = ou=people, dc=outerwebs, dc=nodomain
scope = subtree
user_filter = (cn=%n)
@boxysean
boxysean / gist:5413206
Last active December 16, 2015 09:29
My printing code final idea pad

I'm going to make materials to publicize my thesis project, Outernet.

Outernet is a local wifi network that connects communities in Long Island City, Greenpoint, and Bushwick without using the Internet. People connected to Outernet will be able to participate in the classifieds, forums, and chat.

I want to let people know where they can connect to the network, and make posters to advertise the network.

Design ideas:

@boxysean
boxysean / gist:5132531
Created March 11, 2013 07:27
getting closer to a batman mesh, but need some advice to push it through

I'm testing out a setup in my lab but am having trouble configuring it correctly! I've tried a lot of variations of the setup, read the documentation, and went through the mailing list to see what I'm doing wrong, but can't figure it out.

I followed the sophisticated setup and added ethernet links to it, possibly in a wrong way. I read somewhere that ethernet interfaces must be added to batman as bridges. (Side note: this causes my dmesg output to complain about too small of MTU for the ethernet interfaces but I can't seem to raise the bridge MTU to 1528 like it suggests.)

Network diagram:

       wlan0 AP      br-mesh1 --- eth0
             \      /                 \
              <veng>                   <roa>

\ \