Skip to content

Instantly share code, notes, and snippets.

var assert = require ('assert');
var fs = require ('fs');
var swisseph = require('swisseph');
var date = {year: 1985, month: 1, day: 19, hour: 17, minute: 46};
var julday = swisseph.swe_julday(date.year, date.month, date.day, date.hour, swisseph.SE_GREG_CAL);
var geo = {lat: 38.833333, long: -104.816667}
console.log("Day: " + julday);
# Enables color for the prompt:
export TERM="xterm-color"
# Sets up git branch info in term prompt:
source ~/git-completion.bash
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\[\033[32m\]\$(parse_git_branch)\[\033[00m\]\$ "
alias .="open ."
@JamesHagerman
JamesHagerman / honda-fit-sport-2013-obd2-notes.md
Last active March 8, 2021 03:54
Sniffing OBDII on 2013 Honda Fit Sport

Honda OBDlink SX notes 2015-08-19

My OBDLink SX data:

>AT I
ELM327 v1.3a
>ST DI (HARDWARE ID STRING)
OBDLink SX r4.2
>ST I (FIRMARE ID STRING)
@JamesHagerman
JamesHagerman / gist:4c026ef46db091c5c715
Last active August 26, 2015 07:18
Burning Man 2015 random collection of djs
Disorient 8:00+esp
MONDAY
Douggie Style (10PM)
Whiskey Devil (12AM - 2AM)
TUESDAY
Matthew Doc (2:30PM-4:30PM)
Mattias (9:30PM)
Jake Lama + Crew (11:30PM - 4AM)
@JamesHagerman
JamesHagerman / HandDebug.cs
Created November 4, 2015 23:26
Leap Motion + Unity 5 + Oculus Hand debugging script
using UnityEngine;
using Leap;
public class HandDebug : MonoBehaviour {
// Attach this script to any game object in your scene. I have an empty GameObject named "GlobalScripts"
// that I attach these kinds of "global" scripts to, but anywhere should work.
//
// Once this script is in your scene, select the game object the script is attached to in Unity's
// Inspector panel (the panel that's usually on the right hand side of Unity's main window). When you
@JamesHagerman
JamesHagerman / Noflow-app-and-runtime.md
Last active April 8, 2016 22:09
Setting up noflo webapp and runtime

Noflo with a front end UI component builder

You'll need two repos running for this to work. The webapp, and the noflo runtime.

And you'll need to do some wonky config as well...

NOTE: To complete this, you'll need access to GitHub for some reason! Otherwise
you will not be able to log in to the web app and manually add your runtime's 
@JamesHagerman
JamesHagerman / noflo-list-components.js
Last active April 21, 2016 00:31 — forked from jonnor/noflo-list-components.js
NoFlo list components and metadata
var rootdir = './';
var loader = new noflo.ComponentLoader(rootdir);
loader.listComponents(function() {
console.log(loader.components);
Object.keys(loader.components).forEach(function(name) {
loader.load(name, function(derp, component) {
console.log(name);
console.log(component.description);
console.log('%c +++ app got config +++ ', 'font-size: 18px; color: rgb(0,128,0)');
@JamesHagerman
JamesHagerman / dump.txt
Created August 17, 2016 05:09
sensatron dump
sensatron@sensatron-desktop:~/dev/Sensatron/2016/sensatron-server$ mvn jetty:run
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.pnf:sensatron-server:war:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.pnf:TotalControl:jar should not point at files within the project directory, ${project.basedir}/src/main/resources/TotalControl.jar will be unresolvable by dependent projects @ line 57, column 18
[WARNING] 'dependencies.dependency.systemPath' for ddf.minim:minim:jar should not point at files within the project directory, ${project.basedir}/src/main/resources/minim.jar will be unresolvable by dependent projects @ line 64, column 18
[WARNING] 'dependencies.dependency.systemPath' for ddf.minim:jsminim:jar should not point at files within the project directory, ${project.basedir}/src/main/resources/jsminim.jar will be unresolvable by dependent projects @ line 71, column 18
[WARNING]
[WARNING] It is highly recommend
@JamesHagerman
JamesHagerman / dump.txt
Created August 17, 2016 05:18
another dump
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode):
"Thread-2" #23 prio=5 os_prio=0 tid=0x00007f21001c1000 nid=0x1457 in Object.wait() [0x00007f21050ca000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at com.sun.media.sound.DirectAudioDevice$DirectDL.write(DirectAudioDevice.java:771)
- locked <0x00000000d8f26790> (a java.lang.Object)
at ddf.minim.javasound.JSAudioOutput.run(JSAudioOutput.java:91)
"Java Sound Event Dispatcher" #21 daemon prio=5 os_prio=0 tid=0x00007f21001a7000 nid=0x1451 in Object.wait() [0x00007f21059cc000]