Skip to content

Instantly share code, notes, and snippets.

View eresonance's full-sized avatar

eresonance

  • Inphi Corp
  • Ottawa, ON
View GitHub Profile
#!/bin/env python
import re
class Coordinate(object):
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return "({:.7},{:.7})".format(self.x, self.y)
#!/bin/env python
# yo dawg I heard you needed a proxy for your proxy
# this is a very slow proof of concept
import socketserver
import http.server
import urllib.request
#whatever localhost port we want to listen on
g_port = 9999
@eresonance
eresonance / pull_from_thinkware.sh
Created July 14, 2019 17:52
Script to pull videos from a thinkware wifi camera via ftp
#!/bin/sh
set -e
#set -x
usage () {
cat <<EOF
Usage: $0 [-v|--verbose] [-h|--help] [-f|--from "dirs on camera"] [-t|--to "backup location"] camera_ip
EOF
}
@eresonance
eresonance / .bash_profile
Created November 5, 2014 20:55
Changing an environment variable on every open shell on a remote machine
#this only works if your home dir is shared/mounted on every machine
remote="remote.machine.name"
user=$USER
shell=bash
#on login, see if this is an exceed session or not
if [ -n "$XCONFIG_NAME" -a -n "$XSTART_NAME" ]; then
#following is not totally necessary
echo $DISPLAY > ~/.display