Skip to content

Instantly share code, notes, and snippets.

View tinnvec's full-sized avatar

Alex Hanna tinnvec

View GitHub Profile
@tinnvec
tinnvec / cardSounds.py
Last active January 6, 2017 14:39
Creates json of cardid to sound file names and delays
#!/usr/bin/env python3.4
import re
import json
import unitypack
from unitypack.environment import UnityEnvironment
def loadUnityBundle(filename, env):
f = open(filename, "rb")
ret = unitypack.load(f, env)
f.close()
<?php
error_reporting(0);
$xml = simplexml_load_string(file_get_contents('http://www.dailytechnewsshow.com/category/headlines/feed/'));
$latest = $xml->channel->item[0];
parse_str(parse_url($latest->guid->__toString())['query'], $uid);
$latest_arr = array(
'uid' => $uid['p'],
'updateDate' => date_format(date_create($latest->pubDate->__toString()), "Y-m-d\TH:i:s.0\Z"),
@tinnvec
tinnvec / Others.txt
Last active September 21, 2016 22:31
Magic Cards
1 Hermetic Study
1 Archivist
1 Disease Carriers
1 Urza's Blueprints
1 Winding Wurm
1 Armorer Guildmage
2 Reckless Ogre
1 Molten Hydra
2 Lightning Blast
2 Shock
@tinnvec
tinnvec / autodeploy.sh
Last active June 25, 2016 21:50
Autodeploy script for Travis CI to Github Pages
# autodeploy.sh
if [ -n "$GITHUB_API_KEY" ]; then
cd "$TRAVIS_BUILD_DIR"
# Grab SHA for nice linking
SHA=`git rev-parse --verify HEAD`
# Move into repository folder with compiled code for gh-pages
cd public
@tinnvec
tinnvec / bot-trap.rb
Last active December 24, 2015 15:04
Example of trapping signals to gracefully shut down Cinch bot (for ruby 2+)
require 'cinch'
require 'thread'
mutex = Mutex.new
quit_signalled = ConditionVariable.new
signal_received = nil
bot = Cinch::Bot.new do
configure do |c|
c.nick = 'SignalQuitBot'