Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@stevehenderson
stevehenderson / posix-fun-time.R
Created October 16, 2017 18:30
POSIX Time Function example R
#Dude timeformat string important
as.POSIXct(acas[1,]$DATETIME_END, format="%Y-%m-%dT%H:%M:%S")
as.numeric(as.POSIXct(acas[1,]$DATETIME_END, format="%Y-%m-%dT%H:%M:%S"))
@stevehenderson
stevehenderson / map-roll.js
Last active September 27, 2017 02:03
A module for loading a map in regions
var WorldMap = (function () {
var map;
focusRegion = 0;
function rotateFocus() {
focusRegion++;
if(focusRegion>=areas.length) focusRegion=1;
public boolean firstLast6(int[] nums) {
if((nums[0]==6)||(nums[nums.length-1]==6) )
return true;
else
return false;
}
How to parse this with regex:
{"unit":"101","location_z":1.012054,"location_x":0.956146,"name":"Placer(Clodde)","location_y":-0.3787908,"html":"(unset)","label":"0","type":"1","affordance_id":"453450c6-6219-4dbd-bcb7-061f3472b619"}
test here: http://regexstorm.net/tester
GETS PAIRS
(\".+?\":.+?[,}])
GET SINGLES
Boot the Analyst Ubuntu VM
Open Advanced REST client in chrome
Send these examples
--------------
GET
http://192.168.125.129:7474/db/data/
--------------------
GET
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
//Other ideas
//http://stackoverflow.com/questions/23777076/get-variable-from-www-call-in-unity
@stevehenderson
stevehenderson / index.html
Created July 25, 2015 03:44 — forked from anonymous/index.html
JS Bin basic paygrade // source http://jsbin.com/dopiva
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="basic paygrade">
<script src="https://code.jquery.com/jquery-1.6.4.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script>
var myArr = $.parseJSON('["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10","O1","O2","O3","O4","O5","O6","O7","O8","O9","O10","O1E","O2E","O3E","W1","W2","W3","W4","W5"]');
console.log(myArr[0])
@stevehenderson
stevehenderson / ValuePL1
Created April 22, 2015 16:17
Malone capstone
'Now check result
If (closestDiff = 0) Then
'Perfect match
result = closestValue
Else
'Interpolate
Dim gap As Double
gap = closestDiff + closestDiff2
result = (1 - (closestDiff / gap)) * closestValue + (closestDiff2 / gap) * closestValue2
@stevehenderson
stevehenderson / hero4.md
Last active August 29, 2015 14:18 — forked from KonradIT/hero4.md

#GoPro HERO4 (A tale of firmware leaks and marketing)

Written by /u/konrad-iturbe (Konrad Iturbe) and with help of /u/OverByThere's leaked firmware.


The GoPro HERO4 Black Adventure edition is 4x times more powerful than ever.

HERO4 cameras:

  • HERO4 Black (BANZAI)
@stevehenderson
stevehenderson / wrapString.vb
Created January 27, 2015 00:26
A VBA function to wrap a long string with newline characters
Function wrapString(incomingStr) As String
Dim pParts() As String
pParts = Split(incomingStr, " ")
Dim result As String
Dim k As Integer
For k = LBound(pParts) To UBound(pParts)
result = result & pParts(k)