Skip to content

Instantly share code, notes, and snippets.

1.Install the BEEKs app from the Play store (this is not a Google product)
2.Hold the beacon to the back of the phone (most helpful when there are >1 beacons in the room)
3.The beacon marked (NEAR) will be at the top, select that
4.When connected, a LED will glow inside the beacon
5.Scroll down to the Eddystone area
6.Two buttons, one to set the URL another to set the power/frequency
7.Suggested transmit power is -20dbm at 2 times a second
var getUserHome = function(){
return process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'];
};
var HOME = getUserHome() + '/';
cat statsd.conf
[general]
enabled = yes ; When set to yes, statsd support is enabled
server = 127.0.0.1:8125 ; server[:port] of statsd server to use.
; If not specified, the port is 8125
prefix = asterisk ; Prefix to prepend to all metrics
;add_newline = no ; Append a newline to every event. This is
; useful if you want to run a fake statsd
; server using netcat (nc -lu 8125)
@danjenkins
danjenkins / gist:3ec65c5c9e06deba19a2
Last active August 29, 2015 14:02
results of node index.js hid-mapper
11:21:37 ✔ dan:(master $)~/git/hid-mapper$ node index --vendor 1356 --product 1476 --raw 5 --dump

------------------------------
   Calibrating device...
------------------------------

FIRST_FRAMES: [[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,128,130,126,8,0,0,0,0],[1,126,128,129,126,8,0,0,0,0],[1,126,1
@danjenkins
danjenkins / gist:d92ee69b5b1b7e88e7d4
Created June 5, 2014 20:47
no pressing of any buttons, fills in by itself
hid-mapper --vendor 1356 --product 1476 --buttons l3,r3
Calibrating device...
Prompting for
buttons: l3, r3
joysticks:
Press the l3 button:
Added {"pin":2,"value":124,"name":"l3"}
@danjenkins
danjenkins / gist:8924878151c2d4a67312
Created June 5, 2014 20:38
changing from 123 to 124 ALOT
Change {"pin":2,"value":124}
Change {"pin":2,"value":123}
Change {"pin":2,"value":124}
Change {"pin":2,"value":123}
Change {"pin":2,"value":124}
Change {"pin":2,"value":123}
Change {"pin":2,"value":124}
Change {"pin":2,"value":123}
Change {"pin":2,"value":124}
Change {"pin":2,"value":123}
### Keybase proof
I hereby claim:
* I am danjenkins on github.
* I am danjenkins (https://keybase.io/danjenkins) on keybase.
* I have a public key whose fingerprint is A66F 1AB9 F107 AED1 A3FD A3DD B99A B132 9F32 A493
To claim this, I am signing this object:
//text is split up to letters
$.each(text.split(''), function(i, letter){
//we add 100*i ms delay to each letter
setTimeout(function(){
//we add the letter to the container
$('#container').html($('#container').html() + letter);
}, 100*i);
require 'formula'
class Phpunit < Formula
homepage 'http://www.phpunit.de/manual/current/en/index.html'
url 'http://pear.phpunit.de/get/phpunit.phar'
sha1 'de677ba60b2ccd135002d02501cde16a471503f5'
version 'HEAD'
def install
bin.install "phpunit.phar" => "phpunit"
@danjenkins
danjenkins / gist:4262927
Created December 11, 2012 22:28
fog or snow for all hx locations + folkestone for next 10 days - hourly forecasts
{ Folkestone:
[ { time: '11:00 PM GMT on December 11, 2012', condition: 'Fog' },
{ time: '12:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '1:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '2:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '3:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '4:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '5:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '6:00 AM GMT on December 12, 2012', condition: 'Fog' },
{ time: '7:00 AM GMT on December 12, 2012', condition: 'Fog' },