Skip to content

Instantly share code, notes, and snippets.

View quiffman's full-sized avatar

Richard Guest quiffman

View GitHub Profile
@quiffman
quiffman / gist:70ccb1b5197e18c0e9fdd813bfd400de
Created July 31, 2017 09:20
Arduino RTC Clock Sync with Linux
To sync an arduino RTC clock over USB tty, without the need for installing the DateTime or Time example processing sketch.
Useful for EvilMadScience Bulbdial Clock.
```
$ stty -F /dev/ttyUSB0 raw speed 9600
9600
$ printf '%c%d' $'\xFF' $(date +%s) > /dev/ttyUSB0
```
To follow the change, in a separate terminal run something like:
@quiffman
quiffman / shell
Created June 29, 2016 23:28
Instances Available in ap-southeast-2c
$ aws ec2 describe-reserved-instances-offerings --query "ReservedInstancesOfferings[?AvailabilityZone=='ap-southeast-2c'] [InstanceType]" --output text --region ap-southeast-2 | sort -u
c3.2xlarge
c3.4xlarge
c3.8xlarge
c3.large
c3.xlarge
c4.2xlarge
c4.4xlarge
c4.8xlarge
c4.large
#!/bin/sh
#
# chkconfig: 345 99 01
#
# description: SeisComP is seismological software package for data acquisition,
# processing, distribution and interactive analysis
#
script=/work/seiscomp3/bin/seiscomp
SC3USER=seiscomp
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nz.org.geonet.twitterstatuspush;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import twitter4j.Status;
import twitter4j.Twitter;
#!/usr/bin/env python2
def which(program):
import os
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
@quiffman
quiffman / keybase.md
Created September 30, 2014 20:16
Keybase proof

Keybase proof

I hereby claim:

  • I am quiffman on github.
  • I am quiffman (https://keybase.io/quiffman) on keybase.
  • I have a public key whose fingerprint is BB40 C470 FDD1 A820 C80E ED78 8B6E 412B D314 412C

To claim this, I am signing this object: