Skip to content

Instantly share code, notes, and snippets.

View thefinn93's full-sized avatar

Finn thefinn93

View GitHub Profile
@thefinn93
thefinn93 / wallbase.py
Created April 22, 2012 06:38
Wallbase.cc Scraper
#! /usr/bin/env python
import sys
import json
import subprocess
import urllib
try:
import requests
except:
print "Install requests (try easy_install requests)"
sys.exit()
@thefinn93
thefinn93 / cron.sh
Created May 24, 2012 20:04
CJDNS map
#! /bin/bash
LOGFILE="/var/log/cjdnsmap.log"
CJDADMIN_IP="127.0.0.1"
CJDADMIN_PORT="11234"
CJDADMIN_PASS="hax"
date > $LOGFILE
/home/finn/cjdnsmap/cjdnsmap.py $CJDADMIN_IP $CJDADMIN_PORT $CJDADMIN_PASS /home/finn/cjdnsmap
@thefinn93
thefinn93 / createtables.sql
Created May 28, 2012 03:12
CJDNS registery
CREATE TABLE IF NOT EXISTS `nodes` (
`name` text NOT NULL,
`lat` double NOT NULL,
`lon` double NOT NULL,
`icon` text NOT NULL,
`ip` text NOT NULL,
`publickey` text NOT NULL,
`password` text NOT NULL,
`fcip` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@thefinn93
thefinn93 / current.css
Created June 27, 2012 19:08
DarkNetPlan
.res-nightmode .usertext-body ul li p strong {color:navy;}
.res-nightmode .linkinfo * {color:white;}
.res-nightmode .linkinfo .upvotes * {color:orangeRed!important;}
.res-nightmode .linkinfo .downvotes * {color:#5f99cf!important;}
.res-nightmode label[for="subRedditStyleCheckbox"] {color:#ccc!important;}
/* Sets background of the header to maroon, removes the light blue bottom border */
#header {
background: #0064cd url(%%grid%%) top left repeat;
}
#sr-header-area {
#!/usr/bin/env python
import wx
import os
class MainWindow(wx.Frame):
def __init__(self, parent, title):
self.dirname = ''
# A "-1" in the size parameter instructs wxWidgets to use the default size.
@thefinn93
thefinn93 / callback.php
Created August 24, 2012 01:04
Reddit Oauth
<?
require_once("../requests/library/Requests.php"); // Get this from http://requests.ryanmccue.info/
Requests::register_autoloader();
$client_id = ""; // Get these from https://ssl.reddit.com/prefs/apps
$client_secret = "";
$code = $_GET['code'];
$access_token_url = "https://oauth.reddit.com/api/v1/access_token";
$options = array('auth' => array($client_id, $client_secret));
$token_request = Requests::post($access_token_url, array(), array("grant_type" => "authorization_code","code" => $code, "redirect_uri" => "https://www.thefinn93.com/reddit/cb"), $options);
$response = json_decode($token_request->body);
@thefinn93
thefinn93 / main.md
Created September 10, 2012 20:25 — forked from campadrenalin/main.md
Getting started with Meshnet

Getting started with Meshnet

This document is for people who want to help but have no technical knowledge. It assumes you won't be getting involved in squabbles over which relay technology to use, etc.

Step 1: Set up CJDNS

One of the few things widely agreed upon at the time of this writing is the use of CJDNS. Currently Windows is not supported, but if you have Linux or can run Linux in a virtual machine, you can follow the step-by-step instructions lower on that page to install and start up an instance of CJDNS on your system. If you're using Ubuntu 11.10 (latest version), you can follow these simplified instructions.

One thing you should know is cjdns currently isn't a wireless meshnet. A physical meshnet consisting of nodes geographically close to each other is a long way off. Instead, cjdns offers a "mixnet"-like system. cjdns is routable over the current Internet, so this means right now its like a giant VPN (virtu

@thefinn93
thefinn93 / README.md
Last active October 22, 2015 10:08
Hyperboira Init Script

Note: This is old, sysvinit sucks. There used to be an updated version of this in the cjdns git, but it's gone now. Use systemd or upstart

Installation:

  1. Place hyperboria.sh in /etc/init.d/hyperboria
  2. chmod +x /etc/init.d/hyperboria
  3. update-rc.d hyperboria defaults

This will cause it to automatically start with your computer. You can control it with /etc/init.d/hyperboria . Some systems (Ubuntu, not sure about others) allow you to use the service command, which shortens the command to `service hyperboria

Graphs the number of active users on a subreddit. I just wrote this. You need add a list of subreddits you want graphed to your munin-node file (on debian/ubuntu it's in /etc/munin/plugin-conf.d/munin-node, probably other places on other distros), like such:

[reddit-usersonsub]
env.subs AdviceANimals,announcements,AskREddit,atheism,aww,bestof,blog,funny,gaming,IAmA,movies,Music,pics,politics,science,technology,todayilearned,videos,worldnews,WTF
@thefinn93
thefinn93 / conffinder.py
Last active December 12, 2015 01:48
Frontier FiOS related stuff.
#!/usr/bin/env python
import telnetlib
import getpass
import ConfigParser
import os
import sys
## Configuration ##
# The default values are probably good