Skip to content

Instantly share code, notes, and snippets.

View aheadley's full-sized avatar

Alex Headley aheadley

View GitHub Profile
@aheadley
aheadley / photo-import.py
Last active August 24, 2019 01:19
Python photo importer
#!/usr/bin/env python3
import datetime
import errno
import hashlib
import io
import os
import os.path
import shutil
import struct
def ical_event_generator(src_list):
prev_ical_event = None
for src_event in src_list:
if prev_ical_event is None:
prev_ical_event = mk_ical_event(src_event)
continue
else:
if src_event.ending_day == (prev_ical_event.ending_day + 1):
prev_ical_event.ending_day += 1
else:
@aheadley
aheadley / agdq-gcal-export.py
Last active January 7, 2016 20:07
Tiny webapp to convert AGDQ 2016 schedule page to CSV for importing into Google calendar
#!/bin/env python2
# -*- encoding: utf-8 -*-
import csv
import datetime
import pytz
import flask
import bs4
import requests
@aheadley
aheadley / file-split.py
Created December 10, 2015 20:06
Script to split a youtube video audio file into separate tracks
#!/bin/env python3
import sys
import re
import subprocess
TRACK_LINE_RE = re.compile(r'^(?P<time>(?:\d+:)?\d+:\d+) Track (?P<idx>\d+)-(?P<title>.*)$')
def time_to_seconds(time):
time_spec = [1, 1 * 60, 1 * 60 * 60]
@aheadley
aheadley / extra.txt
Last active March 21, 2016 16:09
rebirth2 save data dump
## save 01
credits: 86053
nepgear:
disk: se card (crit +4, magi def +2)
exp: -801 / 443781
uni:
disk: gold disc (plant def +2, exp +2)
exp: -12651 / 293911
@aheadley
aheadley / rb1.md
Last active October 1, 2024 21:39
Hyperdimension Neptunia Rebirth: Item Locations

Rebirth 1 (no DLC)

Name HP Drops XP Credits
Virtua Forest --- --- --- ---
Dogoo 666 [Dogoo Jelly] 2 1
Tulip 700 [Yellow Petal] 3 4
Dogoo-Man 850 [Dogoo-Man Jelly] 5 5
Boxer-X 1216 [Boxer-X Soul] 8 12
Monster Cave --- --- --- ---
diff -rwu hw1-data-orig/aiplayer.script hw1-data-classic/aiplayer.script
--- hw1-data-orig/aiplayer.script 2015-03-12 16:40:30.657901429 -0400
+++ hw1-data-classic/aiplayer.script 2015-03-12 16:28:22.997599069 -0400
@@ -23,7 +23,6 @@
AIF_RESEARCH_DELAY[AI_INT] 1
AIF_RESEARCH_DELAY[AI_ADV] 0
-
;=============================================================================
; Attackman tweaks:
-----------------------------------------------------------------------------
Originally hosted at: http://mods.relicnews.com/misc/BIGSpec.shtml
-----------------------------------------------------------------------------
BIG FILE FORMAT SPECIFICATION -- RBF1.23 -- v0.8
(incomplete)
01/04/2000
@aheadley
aheadley / guide.md
Created February 4, 2015 05:00
EVE Superior Sleeper Cache

Superior Sleeper Cache

Room 1 (Initial Warp-in)

The room also has a giant cloaked structure that didn't seem to do anything but should probably be investigated to see if bumping into causes a change.

Enemies

None

Most of this is pretty simple, but we'll walk through the whole thing for the sake of completeness. Starting with the inner bit

return ${ ! ${''} = (new ReflectionClass( get_called_class() ) ) }->newInstanceArgs( func_get_args() );

return ${ ! ${''} = (new ReflectionClass( 'A' ) ) }->newInstanceArgs( func_get_args() );

return ${ ! ${''} = ReflectionClass('A') }->newInstanceArgs( func_get_args() );