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 bash | |
echo "Determining OS..." | |
if [[ "$(uname -s)" == "Linux" ]]; then | |
mcdir="$HOME/.minecraft/" | |
downloader="wget --no-check-certificate -q -O" | |
os="linux" | |
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64" | |
elif [[ "$(uname -s)" == "Darwin" ]]; then |
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
def screenshotFilter(poi): | |
'''This looks for signs that have their first line in the 'Image:<id>' format, where <id> is an | |
id from an Imgur.com image.''' | |
if poi['id'] == 'Sign': | |
if poi['Text1'].startswith('Image:'): | |
poi['icon'] = "painting_icon.png" | |
image_html = "<style>.infoWindow img[src='{icon}'] {{display: none}}</style><a href='http://imgur.com/{id}'><img src='http://imgur.com/{id}s.jpg' /></a>".format(icon=poi['icon'], id=poi['Text1'][6:]) | |
return "\n".join([image_html, poi['Text2'], poi['Text3'], poi['Text4']]) | |
def playerFilter(poi): |
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 | |
# -*- coding: utf-8 -*- | |
import json | |
import urllib.request | |
import time | |
import re | |
import sys | |
class Grabber: |
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
def ids (t, d): | |
for i in d.keys(): | |
if re.match(r'^{}$'.format(t), i, re.I): | |
return d[i] |
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 | |
import json | |
import urllib.request | |
import time | |
import re | |
import signal | |
import sys | |
from urllib.parse import urlencode | |
import http.cookiejar |
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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import praw | |
try: | |
from credentials import * #NOQA | |
except: | |
USERNAME = 'username' |
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 | |
# -*- coding: utf-8 -*- | |
import praw | |
import requests | |
import sys | |
try: | |
from credentials import * # NOQA | |
except ImportError: |
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 urllib.request import urlopen | |
import xml.etree.ElementTree as etree | |
import re | |
import json | |
def get_snapshot(): | |
NS = '{http://s3.amazonaws.com/doc/2006-03-01/}' |
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 | |
# Adapted from http://www.creativetux.com/2012/11/streaming-to-twitchtv-with-linux.html | |
# | |
# Make sure to put your twitch.tv key in a file called "key" in the current directory. | |
# | |
# Before running, make sure PulseAudio is set up with the correct loopback modules | |
# and a null sink named "mix". You can use something ilke the following commands: | |
# | |
# pactl load-module module-null-sink sink_name=mix |
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 | |
import json | |
import urllib.request | |
import time | |
import re | |
import signal | |
import sys | |
from urllib.parse import urlencode | |
import http.cookiejar |
NewerOlder