Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephan Sokolow ssokolow

View GitHub Profile
@ssokolow
ssokolow / cavestoryplus_dump.sh
Last active Aug 29, 2015
Simple script for joining Cave Story+ track fragments into files that sound nice in your audio player
View cavestoryplus_dump.sh
#!/bin/sh
# Tool for generating acceptable soundtrack Oggs from Cave Story+ data files
#
# Usage:
# 1. Save this and chmod it executable
# 2. cd into CaveStory+/data/base/Ogg11
# 3. Run something like "~/cavestoryplus_dump.sh curly"
# 4. Enjoy your music
#
# Dependencies:
@ssokolow
ssokolow / Makefile
Last active Aug 29, 2015
Makefile for compiling unxwb on non-Windows platforms rather than using the provided Windows binary in Wine
View Makefile
# Makefile for unxwb from http://aluigi.altervista.org/papers.htm
# NOTE: You must have the zlib development headers installed
#
# Instructions:
# - `make` or `make build` to build a native binary.
# - `make multiarch` to build 64-bit and 32-bit binaries on a 64-bit system
# - `make dist` to produce an optimized zip file from "make multiarch"
# (Also requires `advzip` from AdvanceCOMP installed)
CC = gcc
@ssokolow
ssokolow / crontab
Last active Aug 29, 2015
Simple GTK+ update notifier for apt-get which doesn't nag about restarting your PC
View crontab
# Add this to your USER (not root) crontab for daily update checks
0 6 * * * DISPLAY=:0 ~/bin/update_check.sh
@ssokolow
ssokolow / task_skip_daily
Created Aug 10, 2014
Expect script for deleting all missed instances of TaskWarrior tasks which recur daily
View task_skip_daily
#!/usr/bin/expect --
spawn task "( recur.is:1d or recur.is:daily )" due.before:now status:pending delete
for {} 1 {} {
expect {
"Permanently delete task" { send "y\n"}
"This is a recurring task. Do you want to delete all pending recurrences of this same task? (yes/no)" { send "n\n"}
eof { exit }
}
}
@ssokolow
ssokolow / find_broken_symlinks.sh
Last active Aug 29, 2015
A simple shell script for quickly finding different types of problematic symlinks in places like GOG.com tarballs.
View find_broken_symlinks.sh
@ssokolow
ssokolow / export_tab_groups.py
Created Nov 23, 2014
Quick, rough script for exporting Firefox Tab Groups
View export_tab_groups.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Quick and Dirty Tab Groups Dumper for Firefox
--snip--
Copyright (C) 2014 Stephan Sokolow
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
@ssokolow
ssokolow / sparse_montage.py
Last active Aug 29, 2015
Code which implements a "rubber matrix" and uses it to produce sparse output in ImageMagick's montage utiility
View sparse_montage.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
@todo: Decide on how to give this a command-line interface.
"""
from __future__ import (absolute_import, division, print_function,
with_statement, unicode_literals)
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
@ssokolow
ssokolow / battery_monitor.py
Last active Aug 29, 2015
Low-Battery Warning Monitor for GTK+ 3.x desktops
View battery_monitor.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Simple, efficient low battery monitor
By: Stephan Sokolow (deitarion/SSokolow)
Written for Guest2587 @ FreeNode
Released under the MIT license
Dependencies:
- python-gi
@ssokolow
ssokolow / requirements.txt
Last active Aug 29, 2015
"Tasks Due Today" popup for TaskWarrior
View requirements.txt
tasklib
pytz
tzlocal
@ssokolow
ssokolow / ConcatDesktopDungeonsTracks.py
Created Feb 22, 2015
Script to generate a Desktop Dungeons soundtrack for you if you can rip the audio files from the Unity resource file you paid for
View ConcatDesktopDungeonsTracks.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Script to convert ripped Desktop Dungeons unity resources to an OST
Usage: Place inside the same folder as your extracted .ogg files and run.
Requirements:
- Python 2.7 (3.x may work if you change the shebang)
- SoX
- oggvideotools