Skip to content

Instantly share code, notes, and snippets.

View thieman's full-sized avatar

Travis Thieman thieman

View GitHub Profile
@thieman
thieman / gist:90f858299fe3c1502ef36300fc2057c0
Created June 26, 2021 17:02
RetroArch Core Dump (Mac)
Process: RetroArch [57266]
Path: /Applications/RetroArch.app/Contents/MacOS/./RetroArch
Identifier: com.libretro.RetroArch
Version: 1.9.5 (1.9.5)
Code Type: X86-64 (Translated)
Parent Process: zsh [53328]
Responsible: iTerm2 [1237]
User ID: 502
Date/Time: 2021-06-26 13:01:31.894 -0400
@thieman
thieman / monitors.md
Last active January 14, 2020 19:11
Too many monitors in my life
@thieman
thieman / mongo-cluster.yml
Last active August 29, 2015 14:25
MongoDB 3.0.4 critical section cascading failure repro
rs1n1:
image: mongo:3.0.4
command: mongod --replSet rs1 --storageEngine wiredTiger
rs1n2:
image: mongo:3.0.4
command: mongod --replSet rs1 --storageEngine wiredTiger
rs1n3:
image: mongo:3.0.4
command: mongod --replSet rs1 --storageEngine wiredTiger
rs2n1:
@thieman
thieman / gist:786049112124d15b88a7
Created May 26, 2014 00:42
Overlapping chunks
In [35]: pairs = [(chunk['min']['game_id'], chunk['max']['game_id']) for chunk in chunks]
In [36]: pairs = sorted(pairs, key=itemgetter(1))
In [37]: for idx, pair in enumerate(pairs[:-1]):
if pair[1] != pairs[idx+1][0]:
print pair
....:
(6145071619554493444L, 6157494985551179586L)
(6156600834600561912L, 6168130049646630380L)
@thieman
thieman / bootstrap.sh
Created April 16, 2014 00:13
Automatic Server Names in S3
# Example of how to generate a node name on Amazon EC2
# This calls out to the "magic" IP that can give you your EC2 metadata
IPNAME=`curl -s http://169.254.169.254/latest/meta-data/hostname | cut -d '.' -f1 | cut -d '-' -f1-2 --complement | tr '-' '.' | xargs -I {} python ip_to_name.py {}`
RETVAL=$?
if [ $RETVAL -ne 0 ]
then
# fallback to internal IP if ip-to-name breaks
IPNAME=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' | tr '.' '-'`
fi
@thieman
thieman / gist:7250389
Created October 31, 2013 14:06
Python Twitter Query-and-Grab
""" Logs Tweets based on filtered live stream """
from gamechanger.core.universe import Universe
from ConfigParser import ConfigParser
from tweetstream import FilterStream
def main():
universe = Universe.get_universe()
conn = universe.get_slave_connection(Universe.MONGO_CORE)
  • perform system update
    • if you do it later it will ask for all kind of permissions to override various config files
    • change password for root
      • default password is user
  • Fix trackpad
  • logout and log back in