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/sh | |
# Convert an OSM way to a set of latitude/longitude pairs. Assumes only one way | |
# in input. | |
NODE_PATTERN='<nd ref="\([0-9]\+\)"\/>' | |
COORD_PATTERN='\-\?[0-9.]\+' | |
LAT_PATTERN='lat="'"$COORD_PATTERN"'"' | |
LON_PATTERN='lon="'"$COORD_PATTERN"'"' |
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.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.TreeSet; | |
public class Eliminator | |
{ |
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
"""Provides a lookup table for Minecraft block and item IDs to names. | |
Exposes one dictionary, MC_IDS. Keys are IDs, values are names. | |
""" | |
__author__ = "Samuel Coleman" | |
__copyright__ = "Mojang AB, probably" | |
__credits__ = ["http://minecraft.gamepedia.com/Data_values"] | |
__license__ = "WTFPL" |
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 | |
from __future__ import print_function | |
"""Converts keys in Minecraft player stats files from ids (1.7) to names (1.8). | |
Workaround for SPIGOT-167. | |
Requires a table providing ID to name lookup. Mine is available at |
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
[global] | |
# Windows networking workgroup and machine name. | |
workgroup = SEESIDE | |
netbios name = nancy | |
# Equivalent to the machine description on a Windows desktop. | |
server string = %h server |
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
public class StaticFieldCacheExample | |
{ | |
/* Define a static field to hold the value. */ | |
private static String cachedValue = null; | |
public static String getCachedValue() | |
{ | |
/* If the value has been previously calculated, return it immediately | |
* instead of performing an expensive calculation. */ | |
if (StaticFieldCacheExample.cachedValue != null) |
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, re | |
DRIVE_PATTERN = "Used drive : (.+?) Adapter" | |
TRACK_PATTERN = "([0-9]+) +\| +([0-9]+):([0-5][0-9].[0-9]{2}) \| +([0-9]+):([0-5][0-9].[0-9]{2}) \| +([0-9]+) +\| +([0-9]+)" | |
SPEED_PATTERN = "Extraction speed ([0-9]+.[0-9]) X" | |
def parse(log): | |
if not log.startswith("Exact Audio Copy V"): |
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 | |
"""Use values from one of your personal RSS feed URLs.""" | |
USER="" | |
AUTH="" | |
PASSKEY="" | |
AUTHKEY="" | |
import urllib, re | |
try: |
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/sh | |
# Grab multipiece album art from Amazon. | |
# Usage: | |
# ./grope.sh url output | |
# ...where URL is the URL of one piece of the album art, as shown by | |
# right-click -> Page Info after zooming in on the image, e.g., | |
# http://z2-ec2.images-amazon.com/R/1/a=B0011Z1BII+c=A17SFUTIVB227Z+d=_SCR(3,2,0)_+o=01+s=RMTILE+va=MAIN+ve=391313817+e=.jpg | |
# (Yes, the whole thing.) |
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/sh | |
# Check through a hierarchical music library to verify that album art meets a | |
# minimum size or that music is ReplayGain-tagged. | |
# Usage: | |
# ./checkalbums.sh [-art] [-replaygain] | |
# If -art is given, verify album art size. If -replaygain is given, check for | |
# the existence of ReplayGain tags and add them if not present. | |
MINSIZE=600 |
OlderNewer