Skip to content

Instantly share code, notes, and snippets.

@leeogrady
leeogrady / GPMF_tagging.md
Created September 9, 2018 06:41
Script to scan directories and tag (macOS) indicating telemetry present.

GoPro search for GPMF data - telemetry

Script to scan directories and tag (macOS) indicating GoPro telemetry present.

Requires

Usage

tag -r GPMF $(exiftool -FileName -ext MP4 -if '$GPSPosition =~ / [E,W]/i' -T .) &&tag -a GPMF $(exiftool -FileName -ext MP4 -if '$GPSPosition =~ / [E,W]/i' -T .)

Just before Log Ship

> t1 <- Sys.time()
> query <- paste0("SELECT TOP 20000 ObservationDate, * 
+                 FROM ValueHolder WHERE ObservationDate IS NOT NULL")
> 
> data <- data.table(
+   sqlQuery(EBConnection,  query = query)
+ )
> t2 <- Sys.time()
@leeogrady
leeogrady / Fill excel blanks.md
Created August 24, 2017 21:23
Fill excel blanks between values
  • Highlight column A
  • Press CTRL + G
  • Click Special
  • Select Blanks
  • Click OK
  • Press =
  • Press UP Arrow
  • Press CTRL + ENTER
// HTML //
<div class="col-md-6">
<div for='typeId' class="form-group">
<label for='typeId' class="control-label" >Type</label>
<select class="form-control" name='typeId' id='typeId' onchange='updateModel()' required >
<option value=''>Select Type</option>
<?php
$qry = "SELECT * FROM trailerType ORDER BY name";
if(!$res = $dbc->query($qry)) {
@leeogrady
leeogrady / Reverse Pivot in Excel
Created November 16, 2016 00:32
Covert Wide table to Long...
- Click anywhere within the data table
- Hit the key combination Alt - d - p to bring up the Pivot Table Wizard (which is not on the ribbon)
- Select "Multiple consolidation ranges" and click Next
- Select "I will create the page fields" and click Next
- Select your data table (in the example it's A1:E11) and click Next
- Select the location and click Next
Now you will see a pivot table that looks just like your data table
- Click the Pivot table and in the field list uncheck Row and Column (and uncheck any Page Field, if present)
- Now select the cell with the single remaining total number and double click it.
The result is a new sheet with your data laid out one item per row.