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
#!/usr/bin/env python3 | |
from sys import argv | |
from collections import deque, defaultdict | |
DICTFILE = "/usr/share/dict/words" | |
def get_words(length): | |
words = [] | |
with open(DICTFILE, 'r') as dictfile: |
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
#!/usr/bin/python | |
# This python script will generate game genie codes for NES | |
# Pass in the address and value, with an optional compare value | |
# in hexadecimal format and it will output a game genie code. | |
# This is quick and dirty and largely untested, so YMMV. | |
from sys import argv | |
if len(argv) < 3: |
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
#!/usr/bin/env python3 | |
from json import loads | |
from sys import argv, exit | |
from urllib.request import Request, urlopen | |
if len(argv) < 2: | |
print("Usage: %s <emote_name>" % argv[0]) | |
exit(-1) |
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
""" | |
matrix.py | |
(c) 2007,2016 Thomas McGrew | |
""" | |
VERSION = "0.3-pre" | |
MATRIX_VALID_TYPES = (int, float, complex) | |
MATRIX_VALID_TYPENAMES = ('int', 'float', 'complex') | |
MATRIX_VALID_INTS = (int,) |
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
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
alias ls='ls --color=auto' | |
PS1='[\u@\h \W]\$ ' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var xmax = 670; | |
var ymax = 750; | |
var speed = 3; | |
var coords = { | |
pacman: { x: 336, y: 579, dx: 0, dy: 0 }, | |
inky : { x: 0, y: 0, dx: 0, dy: 0 }, |
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
package main | |
import( | |
"image/png" | |
"image/draw" | |
"image" | |
"io" | |
"os" | |
"fmt" | |
"encoding/base64" |
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
/* Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind */ | |
if (!Function.prototype.bind) { | |
Function.prototype.bind = function (oThis) { | |
if (typeof this !== "function") { | |
// closest thing possible to the ECMAScript 5 internal IsCallable function | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
} | |
var aArgs = Array.prototype.slice.call(arguments, 1), |
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
#!/bin/bash | |
RSS_URL="http://streams.wgbh.org/online/clas/clas_performance.xml" | |
if [ -z $(which xml 2>/dev/null) ]; then | |
echo "xmlstarlet does not appear to be installed." | |
echo "Please make sure it is installed and in your path"; | |
exit 1; | |
fi |
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
wan_interface=ens32 | |
lan_interface=ens33 | |
NewerOlder