Skip to content

Instantly share code, notes, and snippets.

View Aramgutang's full-sized avatar

Aram Dulyan Aramgutang

  • The Interaction Consortium
  • Sydney, Australia
View GitHub Profile
@Aramgutang
Aramgutang / check_for_updates.py
Created April 28, 2011 06:46 — forked from coordt/check_for_updates.py
Check locally installed packages against one or more package indexes for updates and list them.
#!/usr/bin/env python
"""
Use pip to get a list of local packages to check against one or more package
indexes for updated versions.
"""
import pip
import sys, xmlrpclib
from cStringIO import StringIO
from distutils.version import StrictVersion, LooseVersion
from subprocess import Popen, PIPE
@Aramgutang
Aramgutang / nexus_puzzle_6.py
Created May 4, 2011 20:51
Google Nexus S Challenge Puzzle #6
"""
My answer was: "1 vowel; 3-5 digits; letters in ascending order, but sequence
can restart after first 2 if rest of letters are unique. #googlenexus #pattern"
Though it may seem a bit iffy, this is the most specific pattern I could find
that would validate all strings marked as "yes" and invalidate all strings
marked as "no". After 5 hours, I'm not prepared to explore this puzzle any
further.
The following code verifies that my solution holds true.
@Aramgutang
Aramgutang / bulkloader.vsql
Created October 20, 2011 03:52
The Virtuoso Bulk Loader procedures, with modifications to make them execute successfully.
drop table load_list;
create table load_list (
ll_file varchar,
ll_graph varchar,
ll_state int default 0, -- 0 not started, 1 going, 2 done
ll_started datetime,
ll_done datetime,
ll_host int,
ll_work_time integer,
ll_error varchar,
@Aramgutang
Aramgutang / puzzle_1.py
Created November 12, 2011 22:25
Google Galaxy Nexus Challenge 1
# The semaphore alphabet.
# The first character represents number of flags held straight up, and so on, going clockwise.
# Info taken from: http://en.wikipedia.org/wiki/Flag_semaphore
alpha = {
'00002000': ' ',
'10100000': '#',
'00001100': 'A',
'00001010': 'B',
'00001001': 'C',
'10001000': 'D',
@Aramgutang
Aramgutang / virtuoso.sh
Created December 13, 2011 00:17
An rc.d script for controlling Virtuoso
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/virtuoso
VIRTUOSO_DATA=${VIRTUOSO_DATA-/var/lib/virtuoso/db}
VIRTUOSO_CONF=${VIRTUOSO_CONF-${VIRTUOSO_DATA}/virtuoso.ini}
VIRTUOSO_ARGS=${VIRTUOSO_ARGS-}
@Aramgutang
Aramgutang / timelapse.sh
Created April 22, 2013 00:58
A Bash script to take regular screenshots of the Ingress Intel map for creating timelapses of operations.
#!/usr/bin/env bash
while [ 1 ]; do
# The --password-store=basic is there to avoid the KDE Wallet access
# request dialog on start-up.
google-chrome --password-store=basic --app=http://www.ingress.com/intel?ll=-33.781201,150.619812\&z=10 &
# Get the process ID, so we can kill it later
chrome_pid=$!
sleep 3
# Get the X window ID of the process we just started so we can resize it.

Keybase proof

I hereby claim:

  • I am aramgutang on github.
  • I am kotot (https://keybase.io/kotot) on keybase.
  • I have a public key ASA5hK0bwW_C6w_RzrBUT_W7Rn9rjNwX8j5wPTQ9ANGCvwo

To claim this, I am signing this object: