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
<# | |
.SYNOPSIS | |
Uninstalls all unwanted programs listed in the $programNames array. | |
#> | |
function Test-Admin { | |
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) | |
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) | |
} |
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 feedparser | |
import argparse | |
import subprocess | |
from time import mktime | |
from datetime import datetime | |
def get_last_edited(): | |
f = open('last_modified.temp', 'r') | |
data = f.read() | |
f.close() |
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
# make sure you have imagemagick installed | |
convert -coalesce -delay 20 -loop 0 sprite*.png -background white -alpha remove anim.gif |
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
# renames tiles given in dir $1 as frames given as list file $2 | |
tilelist=$(ls $1) | |
framelist=$(cat $2) | |
tiles=($tilelist) | |
frames=($framelist) | |
count=${#frames[@]} | |
for i in `seq 1 $count` | |
do |
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 readline | |
import datetime | |
logpath = "times.txt" | |
lines = [] | |
try: | |
with open(logpath, "r") as f: | |
lines = f.readlines() | |
except: |
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 | |
import sys | |
from ast import literal_eval | |
if len(sys.argv) != 2: | |
print "Usage: ebin INTEGER" | |
sys.exit(1) | |
s = "{0:08b}".format(literal_eval(sys.argv[1])) | |
n = 4 # split into 4 bit blocks | |
# awful reversing hack to get proper formatting | |
s = s[::-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
// This file is automatically generated, but you can add your own variables here too. | |
// Syntax: SET_VAR(variable_name, default, low_limit, upper_limit, slider_exponent) | |
// In code you can read the variable with: GET_VAR(variable_name) | |
SET_VAR(tower_height, 520.0f, 0.0f, 3000.0f, 1.0f) | |
SET_VAR(KSpring, 520.0f, 1.0f, 3000.0f, 1.0f) | |
SET_VAR(WireRadius, 2.0f, 0.1f, 34.0f, 1.0f) | |
SET_VAR(volcanic_sun_x, 0.088000, -20.0f, 20.0f, 1.0f) | |
SET_VAR(mothership_sun_x, 2.026000, -5.0f, 5.0f, 1.0f) | |
SET_VAR(mothership_sun_y, 0.507000, -5.0f, 5.0f, 1.0f) | |
SET_VAR(wire_fog_exp, 0.0f, 0.0f, 100.0f, 1.0f) |
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 python | |
import argparse | |
from struct import * | |
import re | |
def write_raw_palette(palette, output_path, write_header): | |
data = "" | |
header = pack('I', len(palette)) |
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
""" | |
A pretty terrible arithmetic coder with a 0th order model. | |
Based on Matt Mahoney's fpaq0 implementation available at | |
http://mattmahoney.net/dc/#fpaq0 | |
""" | |
import sys |
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
/* This code is released into the public domain. | |
* Pekka Väänänen, 2016 */ | |
/* | |
http://www.mit.edu/~tarvizo/nes-controller.html | |
+----> Power +5V (white) | |
| | |
5 +---------+ 7 | |
| x x o \ |