Skip to content

Instantly share code, notes, and snippets.

making my way downtown, walking fast

vgmoose vgmoose

making my way downtown, walking fast
View GitHub Profile
vgmoose / colorstrip.user.js
Created Mar 29, 2014
removes twitch color
View colorstrip.user.js
// ==UserScript==
// @name Twitch Color Strip
// @namespace
// @version 0.1
// @description Removes all colors from the chat in twitch
// @match*
// @copyright vgmoose
// @icon
// ==/UserScript==
vgmoose / gradeCheck.js
Created May 13, 2014
phantomjs --ignore-ssl-errors=true --load-images=no --ssl-protocol=tlsv1 gradeCheck.js
View gradeCheck.js
// Example using HTTP POST operation
var username = "USERNAME"; // must be all capitalized
var pass = "password";
var page = require('webpage').create();
var server = '';
var data = 'userid='+username+'&pwd='+pass+'&languageCd=ENG&timezoneOffset=0&Submit=Go&cmd=login';
page.settings.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/7.0.2 Safari/537.74.9';
View howto
print(" Old:");
print(`ifconfig en0 | grep ether`);
$oldmac=sprintf(`ifconfig en0 | grep ether`);
if (length($ARGV[$0])==17)
elsif (length($ARGV[$0])!=0)
print(" New: ether ".$ARGV[$0]."\n");
from Tkinter import *
import os
def set_values(val):
os.system("echo "+str(val)+" > /sys/class/backlight/acpi_video0/brightness")
def stay_open():
master = Tk()
View gist:19be3b2c5fcac453d072
<vgmoose> bamboo: link rayoub
<rayoub> bamboo: link vgmoose
<bamboo> rayoub and vgmoose are linked
the "main" account which will be shown is whichever spoke last
the preference for scrambling is not linked
karma is still tracked separately, but added together for linked usernames
both nicks must link the other nick for them to be connected
<vgmoose> bamboo: unlink rayoub
View gist:362b58ea088a29ffabd6
import pickle, os
# get all dotfiles (which could potentially contain dumped data
dotfiles = [x for x in os.listdir('.') if x.startswith('.')]
objects = []
filenames = []
for filename in dotfiles:
View gist:7f9d5b43f22bfe540f57
import json, urllib2, sys
with open("/usr/share/dict/words") as word_file:
english_words = set(word.strip().lower() for word in word_file)
def is_word(word):
return word.lower() in english_words
since = sys.argv[1]
View gist:2eeb200fba60753beccb
public static void study(FlashCard[] cards)
LinkedList<FlashCard> queue = new LinkedList<FlashCard>();
for (FlashCard c : cards)
LinkedList<FlashCard> correct = new LinkedList<FlashCard>();
View Collection View Snippets.markdown

Snippet 1

goes in CVDCollectionViewController.m, replaces existing viewDidLoad

- (void)viewDidLoad
    // Do any additional setup after loading the view.
    [super viewDidLoad];
    // color the CollectionView's background color
    self.collectionView.backgroundColor = [UIColor colorWithHue:.5 saturation:.3 brightness:.4 alpha:1];
vgmoose / ttg.markdown
Last active Aug 29, 2015
Taps Touches and Gestures
View ttg.markdown

Simple Taps

Snippet 1.1

this is what the resulting control+drag from the UILabel to STViewController.m should look like

@property (weak, nonatomic) IBOutlet UILabel *tapStatus;

Snippet 1.2

goes in body of STViewController.m