Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@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 / 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 / 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 / gist:5581467
Last active December 17, 2015 08:39
VBA code for saving a csv to disk
Sub SendResults()
Dim OutApp As Object
Dim OutMail As Object
Dim currentPath As String
currentPath = Application.ActiveWorkbook.Path
currentPath = "\\se\ABETWorking\SEN0_CapstoneDA"
Dim csvPath As String
Dim emailBody As String
@stevehenderson
stevehenderson / EmailSheet
Last active December 17, 2015 08:39
VBA Code to attach a spreadsheet to an outlook email
Sub SendResultsFull()
Dim OutApp As Object
Dim OutMail As Object
Dim currentPath As String
currentPath = Application.ActiveWorkbook.Path
currentPath = "\\se\ABETWorking\SEN0_CapstoneDA"
Dim csvPath As String
Dim emailBody As String
@stevehenderson
stevehenderson / Copy_To_Worksheets
Last active December 17, 2015 08:39
VBA Code to split a column of factors into independent sheets. (VBA, Split, Sheets, Excel). Original code: http://www.rondebruin.nl/win/s3/win006_4.htm
Option Explicit
'Original code: http://www.rondebruin.nl/win/s3/win006_4.htm
Sub Copy_To_Worksheets()
Dim CalcMode As Long
Dim ws2 As Worksheet
Dim WSNew As Worksheet
Dim rng As Range
Dim cell As Range
Dim Lrow As Long
@stevehenderson
stevehenderson / findFinalRow
Created May 15, 2013 04:03
A VBA helper function to find the final row of data on a worksheet (VBA, row, last, find)
'findFinalRow
'A helper function to find the final row of data on a worksheet
'
'To use, provide the name of the worksheet
'The function assumes the data starts in cell A1
'and will return the row number of the last row of data
'
'Author: Steve Henderson steven.henderson@usma.edu
'
Function findFinalRow(sheetName As String)
@stevehenderson
stevehenderson / Pivot Table Settings
Created May 15, 2013 04:07
VBA code to configure a pivot table
'
' Configure the pivot table for analysis
'
Sub PvotTableTweak()
Dim pt As PivotTable
Dim WSD As Worksheet
Set WSD = Worksheets("DATA")
@stevehenderson
stevehenderson / writeCSV
Last active December 17, 2015 08:39
VBA code to write worksheet calues to a CSV
Function writeCSV(csvPath As String) As String
'Create a CSV
Dim i As Integer
Dim lastUsedColumn As Integer
Dim done As Boolean
lastUsedColumn = 9
i = 1
done = False
While Not done
@stevehenderson
stevehenderson / findLastColumn
Created May 15, 2013 04:01
VBA helper function to find the final column of data on a worksheet (VBA, last, column, find, helper)
'A helper function to find the final column of data on a worksheet
'
'To use, provide the name of the worksheet
'The function assumes the data starts in cell A1
'and will return the column number of the column of data
'
'Author: Steve Henderson steven.henderson@usma.edu
'
Function findLastColumn(sheetName As String)
' Find the last column with data