Skip to content

Instantly share code, notes, and snippets.

@lancehunt
lancehunt / flow.json
Created April 21, 2012 23:27
Untitled_0
{
"nodes": [
{
"title": "MongoDB Insert",
"icon": "images/icons/mongodb_64.png",
"top": 94,
"left": 329,
"compID": "mongodb_insert",
"database": "elasticdb",
"collection": "myCollection",
@lancehunt
lancehunt / flow.json
Created April 21, 2012 23:28 — forked from zubairov/flow.json
Twitter Timeline to Log
{
"nodes": [
{
"title": "Timeline",
"icon": "images/icons/twitter_64.png",
"top": 149,
"left": 182,
"compID": "twitter",
"username": "lancehunt",
"backFill": "15",
@lancehunt
lancehunt / flow.json
Created April 21, 2012 23:29 — forked from zubairov/flow.json
Show CPUs
{
"nodes": [
{
"title": "Code",
"icon": "images/icons/code_64.png",
"top": 126,
"left": 227,
"compID": "code",
"code": "console.log(JSON.stringify(require('os').cpus(), null, '\\t'));\nconsole.log(this.get('flowID'));",
"id": "step_106"
@lancehunt
lancehunt / flow.json
Created April 21, 2012 23:30
Untitled_336
{
"nodes": [
{
"title": "HTTP Response",
"icon": "images/icons/http_64.png",
"top": 82,
"left": 828,
"compID": "http_response",
"id": "step_437"
},
@lancehunt
lancehunt / client.html
Created July 23, 2012 21:02
Basic socket.io example that fails in safari. Run server with node then navigate to https://localhost:9000
<html>
<head>
<div>Check your debug window for websocket failures in Safari</div>
<div>Should give you this error: WebSocket network error: The operation couldn’t be completed. (OSStatus error -2146885613.) </div>
<script src="/socket.io/socket.io.js"></script>
<script>
var baseUrl = window.location.protocol + "//" + window.location.host, // assumes client is hosted on same url/port as socket.io websockets
socket = io.connect(baseUrl);
socket.on('news', function (data) {
@lancehunt
lancehunt / Socket.IO Chrome Network log (Failure)
Created October 25, 2012 21:08
Socket.io v0.9.5 failure on websocket fallback to xhr-polling
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.4"
},
"pages": [
{
"startedDateTime": "2012-10-25T21:15:56.432Z",
@lancehunt
lancehunt / gist:2ac22cb1f50fe61e71eedcbe4799af63
Created August 11, 2016 21:53
onename.com verification
Verifying that +lancehunt is my blockchain ID. https://onename.com/lancehunt
@lancehunt
lancehunt / HowToOTGFast.md
Created October 24, 2016 03:41 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. Finally, open up the cmdline.txt. Be careful with this file, it is very picky with its formatting! Each parameter is seperated by a single

Keybase proof

I hereby claim:

  • I am lancehunt on github.
  • I am lancehunt (https://keybase.io/lancehunt) on keybase.
  • I have a public key whose fingerprint is F913 78EB 8FA1 41F1 2230 493A 5779 AE98 7BFC CD92

To claim this, I am signing this object:

@lancehunt
lancehunt / createDataDogPolicy.sh
Created March 1, 2017 01:51
AWS CLI to setup role and policies for DataDog Integration
#!/bin/bash
#aws iam create-policy --policy-name DatadogIntegrationPolicy --policy-document file://datadogPolicy.json
aws iam create-role --role-name DatadogIntegrationRole --assume-role-policy-document file://datadogRoleTrustPolicy.json
aws iam attach-role-policy --role-name DatadogIntegrationRole --policy-arn arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess
aws iam attach-role-policy --role-name DatadogIntegrationRole --policy-arn arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess