This file contains hidden or 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 | |
if [ $# -eq 0 ] | |
then | |
echo "usage: $0 <disc number>" | |
exit | |
fi | |
discnumber=$(printf "%02d" $1) | |
discname="Disc $discnumber" |
This file contains hidden or 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 random | |
class MarkovChainGenerator(object): | |
def __init__(self, fileHandle): | |
self.words = self.read_words(fileHandle) | |
self.create_database() | |
@staticmethod | |
def read_words(fileHandle): | |
fileHandle.seek(0) |
This file contains hidden or 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 | |
import re | |
import subprocess | |
import sys | |
from xml.etree import ElementTree | |
if len(sys.argv) == 2: | |
commitMessage = sys.argv[1] | |
else: |
This file contains hidden or 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 | |
import re | |
import sys | |
import subprocess | |
import urllib.request | |
from xml.etree import ElementTree | |
from gzip import GzipFile | |
from io import BytesIO |
This file contains hidden or 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 | |
# Purpose: Send an e-mail notification when a Steam trade offer is accepted or | |
# received. | |
# Documentation URL: | |
# https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService | |
# Set these before running this script: | |
STEAM_API_KEY = 'your steam API Key' | |
STEAM_PROFILE = 'your public steam profile name' |
This file contains hidden or 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 work is licensed under the Creative Commons Attribution 3.0 United States License. To view | |
// a copy of this license, visit http://creativecommons.org/licenses/by/3.0/us/ or send a letter | |
// to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
// Copyright 2009 John Tantalo <[email protected]> | |
(function () { | |
// get selection | |
var selection = window.getSelection ? window.getSelection() : | |
document.getSelection ? document.getSelection() : |
This file contains hidden or 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 | |
from gimpfu import * | |
def get_layer_fields(layer): | |
return [layer.name, | |
str(layer.offsets[0]), | |
str(layer.offsets[1]), | |
str(layer.width), | |
str(layer.height)] |
This file contains hidden or 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/sh | |
SERVER=example.com | |
USERNAME=username | |
PASSWORD=password | |
FILENAME=$1 | |
echo -n "Uploading $1..." | |
ftp -n $SERVER <<End-Of-Session |
This file contains hidden or 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
for i in *.lua; do expand -t 4 $i > $i.notabs && mv $i.notabs $i; done |