Skip to content

Instantly share code, notes, and snippets.

View alukach's full-sized avatar
🍊

Anthony Lukach alukach

🍊
View GitHub Profile
@alukach
alukach / mpo2gif.sh
Created July 11, 2012 07:09 — forked from fuba/mpo2gif
Convert a .mpo file to an animated gif
#!/bin/sh
# mpo2gif
# convert all .mpo files in a directory to a animation gif.
# Source: https://gist.github.com/878450
# this idea is from http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=16275
# this script requires exiftool and imagemagick.
for file in *.[Mm][Pp][Oo0]; do
@alukach
alukach / gist:3146699
Created July 19, 2012 20:45 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS and create PostGIS template on Ubuntu 11.10 Oneiric Ocelot
#!/bin/bash
#
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
import math
import random
def getSuccessors(color):
def perm(l, n, str_a, perm_a):
"""Generate every permutation of length `n`, selecting from the
possible values in `l`.
"""
if len(str_a) == n:
return (str_a,) + perm_a
@alukach
alukach / install_makefiles
Created September 12, 2013 07:36
To be used when installing MB-System
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
#--------------------------------------------------------------------
# The MB-system: install_makefiles 5/20/94
# $Id: install_makefiles 2111 2013-06-07 02:28:59Z caress $
#
# Copyright (c) 1993-2013 by
# D. W. Caress (caress@lamont.ldgo.columbia.edu)
# and D. N. Chayes (dale@lamont.ldgo.columbia.edu)
#!/bin/sh
rm /tmp/hma.sh
cat <<INSTALL > /tmp/hma.sh
#!/bin/sh
cd /tmp
mkdir hma
cd hma
cat <<EOF > hma.conf
remote 173.208.32.98 53
client
@alukach
alukach / Preferences.sublime-settings
Created December 5, 2013 20:51
A backup of my SublimeText 2 User Preferences. Copy/Paste these to your User Profile (`Cmd`+`,`)
{
"font_size": 15.0,
"ignored_packages":
[
"Vintage"
],
"rulers": [72, 79],
"tab_size": 4,
"translate_tabs_to_spaces": true,
"draw_white_space": "all",
@alukach
alukach / gist:7868162
Created December 9, 2013 06:20
DAC Troubleshooting
pi@raspbmc:~$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0c45:8888 Microdia
Bus 001 Device 005: ID 08bb:2702 Texas Instruments Japan Speakers
pi@raspbmc:~$ ls /proc/asound
PCM2702 card0 cards devices hwdep modules pcm timers version
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alukach
alukach / Default (Linux).sublime-keymap
Last active August 29, 2015 13:55
My SublimeText3 Setup
[
{"keys": ["ctrl+shift+0"], "command": "insert_snippet","args": {"contents": "import ipdb; ipdb.set_trace();"}},
{"keys": ["ctrl+shift+o"], "command": "prompt_open_folder"},
]