Skip to content

Instantly share code, notes, and snippets.

@gamblore
gamblore / right-tabs
Created April 10, 2015 06:21
Right tabs for chrome extension.
manifest.json----
{
"background": {
"persistent": false,
"page": "right-tabs.html"
},
"description": "Create tabs on the right.",
"name": "RightTabs",
"permissions": [
"tabs"
@gamblore
gamblore / gist:5998024
Last active December 19, 2015 18:19
irssi-hunspell.pl
########################################NEED Text::Hunspell libhunspell-dev INSTALLED##################
#* Copyright (c) 2013, Adam Metcalf
#* All rights reserved.
#*
#* Redistribution and use in source and binary forms, with or without
#* modification, are permitted provided that the following conditions are met:
#* * Redistributions of source code must retain the above copyright
#* notice, this list of conditions and the following disclaimer.
#* * Redistributions in binary form must reproduce the above copyright
#* notice, this list of conditions and the following disclaimer in the
@gamblore
gamblore / Maze.java
Created July 7, 2013 23:13
Maze generation in Java. (For libGDX)
package net.gamblore.maze.entities;
import java.util.LinkedList;
import java.util.List;
import com.badlogic.gdx.Gdx;
public class Maze {
private static final String TAG = "Maze";
@gamblore
gamblore / maze.py
Created July 6, 2013 21:23
Maze Generator (based on Kruskal Algorithm)
# _ _ _ _ _ _ _ _ _ _
#|_ _____ _ |
#| |_| _______|_| |_|
#| _| |_ | ___ _|
#|_ | | |_ | |_____|
#|_ | | |_ | | | |
#|_ |_ _ | |_|
#|___|_ | |_| ___ |
#| |_ | _|_| _| |
#|_|_ | |___ | |
@gamblore
gamblore / Voronoi.html
Last active December 15, 2015 19:49
Fun with Voronoi
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
<script type="text/javascript">
var points = [];
var colors = [];
function getColor(index) {
@gamblore
gamblore / gist:5306465
Created April 3, 2013 23:40
Find folder based on filename. Needs Season Episode stripping.
#!/usr/bin/env python
import os, sys
import re, collections
from operator import itemgetter
PATH = "/TV"
DICTIONARY = os.listdir(PATH)
def damerau_levenshtein_distance(s1, s2):
@gamblore
gamblore / gist:5295720
Last active December 15, 2015 17:19
SABnzbd-remote which works a bit like tranmission-remote
#!/usr/bin/env python
import getopt
import sys
import os
import urllib2
import json
HOST = "localhost"
PORT = 9092 # Set to your port
@gamblore
gamblore / TestActionBarActivity.java
Created January 15, 2012 04:58
How to use the ActionBarActivity
package com.gamblore.test.actionbar;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Toast;
import com.gamblore.widget.ActionBarActivity;
import com.gamblore.widget.ActionButton;