Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@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)
@stevehenderson
stevehenderson / countDecimals.vb
Last active August 29, 2015 14:14
A VBA function to count decimal points in text
Function countDecimals(incomingStr) As Integer
Dim stringParts() As String
stringParts() = Split(incomingStr, ".")
Dim i As Integer
i = UBound(stringParts)
countDecimals = i
End Function
#add interaction columns -- TODO: Programticcaly do this later
#c12
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,4],binary.factors.matrix)
#c13
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,3],dd)
#c14
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,2],dd)
#c15
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,1],dd)
#c23
@stevehenderson
stevehenderson / lm_program
Created September 23, 2014 02:42
doe lm programatically build linear model
#This line creates a linear model with all variables and 2 way interaction
LinearModel.1 <- lm(result~(.)^2,data=Design.2)
import st.Prompt;
public class Lift {
public static void printShaft(String[] a) {
for (int i = 0; i < 10; i++) {
System.out.println(a[i] + (10 - i));
}
System.out.println();
}
import st.Prompt;
public class Lift
{
public static void printShaft(String [] a){
for (int i=0; i < 10; i++){
System.out.println(a[i]+(10 - i));
}
@stevehenderson
stevehenderson / gist:8f76e9b9cc8896e4fa2f
Last active August 29, 2015 14:05
Simple java guessing game
//I MADE A CHANGE!! HI EVA
package hendo;
//We need two packages for reading and handling IO errors
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class JavaGame {
@stevehenderson
stevehenderson / disruptSeq.R
Created March 21, 2014 20:38
Spoofing R sequence operator #R #spoof
(function(x) as.vector(t(cbind(x,x+5)))) (1:5)