Skip to content

Instantly share code, notes, and snippets.

View kategray's full-sized avatar

Kate Gray kategray

  • CoreCodec, Inc.
View GitHub Profile
@kategray
kategray / ghettio.v
Created October 14, 2017 16:44
GHETT-iO Verilog
// ======================================================================
// GHETT-iO.v generated from TopDesign.cysch
// 10/13/2017 at 21:35
// This file is auto generated. ANY EDITS YOU MAKE MAY BE LOST WHEN THIS FILE IS REGENERATED!!!
// ======================================================================
/* -- WARNING: The following section of defines are deprecated and will be removed in a future release -- */
`define CYDEV_CHIP_DIE_LEOPARD 1
`define CYDEV_CHIP_REV_LEOPARD_PRODUCTION 3
`define CYDEV_CHIP_REV_LEOPARD_ES3 3
@kategray
kategray / mass_erase.c
Created October 7, 2017 07:30
MSP430FR5994 Mass Erase
/*
* This function mass-erases a MSP430FR5994 in about 3 seconds. It wipes the entirety of FRAM, losing all data.
* It is intended for use in tamper-resiliency applications, and runs from RAM to avoid issues with self-erasing.
* After the function completes, it will force a reset by writing an invalid value to the watchdog register.
* This code is intended for use with Code Composer Studio, and will need to be adapted to be compatable with Kiel,
* Rowley, or IAR.
*/
#include <stdio.h>
#include <msp430.h>
@kategray
kategray / GoPro-I2Ccommands.md
Created September 20, 2017 03:20
List of all I2C commands between Dual Hero Bacpac and Hero 3+ Black.
op label description addr arguments remark
vs GET_BACPAC_PROTOCOL_VERSION get protocol version - none bacpac must reply with the correct verification string
TD SET_CAMERA_SETTING set camera setting - values returned by td set settings and enter 3D mode
TM SET_BACPAC_DATE_TIME set time 1-6 YY MM DD hh mm ss
TM SET_CAMERA_DATE_TIME set time 1-6 YY MM DD hh mm ss
CM SET_BACPAC_MODE camera mode 7 0 video; 1 photo; 2 burst photo; 3 timelapse; 5 playback; 7 menu (r/o)
CM SET_CAMERA_MODE camera mode 7 0 video; 1 photo; 2 burst photo; 3 timelapse; 5 playback; 7 menu (r/o)
PR SET_BACPAC_PHOTO_RESOLUTION photo resolution 8 3 5MP Medium; 4 7MP Wide; 5 12MP Wide; 6 7MP Medium
PR SET_CAMERA_PHOTO_RESOLUTION photo resolution 8 3 5MP Medium; 4 7MP Wide; 5 12MP Wide; 6 7MP Medium
@kategray
kategray / extract.php
Last active April 21, 2017 00:42
Extract text from the Canadian business directory
#!/usr/bin/env php
<?php
/**
* Note: This requires the html5-php library.
* https://github.com/html5lib/html5lib-php
*/
/*
* Exit Codes
*/
@kategray
kategray / openpgp.txt
Created March 7, 2016 08:22
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:f06dd7a7017a24e3c2b94b8f62572bd62e59c7d3]
@kategray
kategray / vevo_test.php
Created June 5, 2015 07:58
Do not so nice things to VEVO
<?php
// Target video to get
$video_id = 'USCJY1531563'; // http://www.vevo.com/watch/taylor-swift/Bad-Blood/USCJY1531563
define ('API_URI', 'https://apiv2.vevo.com/video/%s?token=%s');
define ('STREAM_URI', 'https://apiv2.vevo.com/video/%s/streams/%s?token=%s');
// They blacklist certain user agents, so pretend to be my Mac
define ('USER_AGENT', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36');