I hereby claim:
- I am don on github.
- I am doncoleman (https://keybase.io/doncoleman) on keybase.
- I have a public key ASAHcDKLEfyv4tJbdZ2G6eO7Zk1RB8L0EUeiC8hBtIaEPQo
To claim this, I am signing this object:
/** | |
* Convert a hex string to an ArrayBuffer. | |
* | |
* @param {string} hexString - hex representation of bytes | |
* @return {ArrayBuffer} - The bytes in an ArrayBuffer. | |
*/ | |
function hexStringToArrayBuffer(hexString) { | |
// remove the leading 0x | |
hexString = hexString.replace(/^0x/, ''); | |
// Sends a NDEF Message to a Peer | |
// Requires SPI. Tested with Seeed Studio NFC Shield v2 | |
#include "SPI.h" | |
#include "PN532_SPI.h" | |
#include "snep.h" | |
#include "NdefMessage.h" | |
#define TEXT_SIZE 226 | |
#define LANGUAGE_ENCODING_SIZE 3 |
// Mock BLE so you can run example from nodejs | |
const ble = { | |
write: function(device_id, service, characteristic, buffer, success, failure) { | |
// log to console instead of writing | |
console.log('>>', new Uint8Array(buffer)); | |
// always call success callback | |
success(); | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
location / { | |
proxy_set_header X-Forwarded-Host $host:$server_port; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass http://localhost:8000/; | |
} |
# get git branch info using old bash function | |
# the zsh way to do this is vsc_info | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
# add git branch version to prompt | |
setopt PROMPT_SUBST | |
PROMPT='%n@%m %1~$(parse_git_branch) %# ' |
// | |
// Write "Hello, world!" in a plain text NDEF message | |
// Tag must be a Mifare Classic with a 4 byte ID | |
// Tested with Samsung TecTile | |
// | |
#include <Wire.h> | |
#include <Adafruit_NFCShield_I2C.h> | |
#define IRQ (2) | |
#define RESET (3) // Not connected by default on the NFC Shield |
// Print the WiFi firmware version and MAC address for MRK boards | |
// Based on https://www.arduino.cc/en/Reference/WiFiNINAMACAddress | |
// and https://forum.arduino.cc/index.php?topic=114568.msg862118#msg862118 | |
#include <SPI.h> | |
#ifdef ARDUINO_SAMD_MKR1000 | |
#include <WiFi101.h> | |
#define WIFI_LIB "WiFi101" | |
#else | |
#include <WiFiNINA.h> |
var app = { | |
initialize: function() { | |
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); | |
}, | |
onDeviceReady: function() { | |
// Auto connect whenever the device is in range | |
const MAC_ADDRESS = 'E4:86:1E:4E:5A:FB'; | |
ble.autoConnect(MAC_ADDRESS, app.onConnected, app.onDisconnected); | |
}, |
#!/usr/bin/perl -w | |
# Run this from the Arduino library directory to generate keywords.txt | |
# Optionally pass the name of the library as the first argument | |
# $ gen_keywords.pl Foo > keywords.txt | |
use strict; | |
my $in_public = 0; |