This file contains 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
load("@io_bazel_rules_go//go:def.bzl", "go_prefix") | |
go_prefix("myThing") # No idea what this string should be. Probably matters *shrug* | |
This file contains 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
from collections import defaultdict | |
def tree(): | |
return defaultdict(tree) | |
def getAndInsert(value, tree): | |
# Adds a value to the tree, returns how much of the input collided | |
collisionLength = 0 | |
cur = tree | |
for v in value: | |
if v in cur: |
This file contains 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 <SPI.h> | |
#include <Ethernet.h> | |
#include <RCSwitch.h> | |
// Switch settings | |
typedef struct Config{ | |
String name; | |
long code[2]; | |
}; | |
Config outlets [5] = { |
This file contains 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
# Agressive resize | |
setw -g aggressive-resize on | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h |
This file contains 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 java.applet.AudioClip; | |
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.FontMetrics; | |
import java.awt.Graphics; | |
import java.awt.Image; | |
import java.awt.Point; | |
import java.awt.Rectangle; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; |
This file contains 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
data =[ | |
'Row: 1', | |
'Row: 1 Seat: 2', | |
'Row: 1 2 3 stuff blah Seat: Something else lalala '] | |
>>> [re.match("^Row: (.*?)(Seat: .*)?$", line).groups() for line in data] | |
[('1', None), ('1 ', 'Seat: 2'), ('1 2 3 stuff blah ', 'Seat: Something else lalala ')] |
This file contains 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 math | |
import random | |
import pygame | |
from pygame.locals import * | |
pygame.init() | |
# Overview | |
# Simulator | |
# run | |
# addObject |
This file contains 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 BaseHTTPServer | |
from subprocess import Popen, PIPE | |
# What interface to listen on | |
# Don't change this unless you want to leak your passwords. | |
HOST = '127.0.0.1' | |
# What port to listen on. Change this if you'd like, | |
# you'll need to update the chrome extension's port too. | |
PORT = 9573 |
This file contains 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
server { | |
listen 80; | |
server_name ~^(.*).theepicsnail.net; | |
root /home/snail/public_html/$1/; | |
charset utf-8; | |
location / { | |
autoindex on; | |
} | |
} |
This file contains 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
set $mod Mod4 | |
set $alt Mod1 | |
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# enter fullscreen mode for the focused container | |
bindsym $mod+f fullscreen | |
bindsym $mod+F5 exec --no-startup-id i3-msg restart |