This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#https://xlsxwriter.readthedocs.org/example_unicode_polish_utf8.html | |
############################################################################## | |
# | |
# A simple example of converting some Unicode text to an Excel file using | |
# the XlsxWriter Python module. | |
# | |
# This example generates a spreadsheet with some Polish text from a file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.querySelector('canvas'); | |
var statusText = document.querySelector('#scanBtn'); | |
statusText.addEventListener('click', function() { | |
statusText.textContent = 'scanning...'; | |
ring.connect() | |
.then(() => ring.startNotificationsEvents().then(handleEvent)) | |
.then(() => { | |
statusText.textContent = 'got one...'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
corebluetooth bindings | |
startScanning: 4.501ms | |
stopScanning: 0.555ms | |
^C | |
Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
corebluetooth bindings | |
startScanning: 8.440ms | |
stopScanning: 0.465ms | |
^C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
corebluetooth | |
Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/advertisement-discovery.js | |
peripheral discovered (5de0dfa124b242ba8fdfa8eb6d9e3542 with address <00:22:d0:2a:e4:a3, unknown>, connectable true, RSSI -40: | |
hello my local name is: | |
undefined | |
can I interest you in any of the following advertised services: | |
["180d"] | |
here is my manufacturer data: | |
"6b00010000" | |
my TX power level is: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peripheralUuidString is a lower case string no dashes | |
serviceUuidString is a lower case string no dashes | |
characteristicUuidString is a lower case string no dashes | |
serviceUuidString is a lower case string no dashes | |
serviceUuidsArray, array of serviceUuidString | |
descriptorHandle TODO | |
propertyString one of ['broadcast', 'read', 'writeWithoutResponse', 'write', 'notify', 'indicate', 'authenticatedSignedWrites', 'extendedProperties'] | |
propertiesArray containing one or more of propertyString | |
descriptorObject = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var moment = require('moment-timezone'); | |
moment().tz("America/Phoenix").format(); | |
fs.readdir( process.argv[2], function (err, files) { | |
if (err){ | |
console.log("error", err); | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2014-2015 Arduino LLC. All right reserved. | |
Copyright (c) 2016 Sandeep Mistry All right reserved. | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Dump firmware from nrf51 and maybe other cortex-m devices | |
# The script thats missing from http://blog.includesecurity.com/2015/11/NordicSemi-ARM-SoC-Firmware-dumping-technique.html | |
# Also inspired by https://tasteless.eu/post/2015/12/32c3ctf-emb400/ | |
# Requires seperate instace gdb server already running, for my jlink I use | |
# openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd;" -f target/nrf51.cfg | |
# uicr and ficr are always accessible so you might want to dump those externally and compare? | |
# openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd; set WORKAREASIZE 0;" -f target/nrf51.cfg -c "init; reset halt; flash read_bank 1 uicr-normal.bin 0x0 0x100; exit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer | |
unpacks | |
Sniffer/Firmware/ble-sniffer_nRF51822_1.0.1_1111_Sniffer.hex | |
• JLinkExe -if SWD -device nrf51 | |
• w4 0x4001e504, 0x2 | |
• w4 0x4001e50c, 0x1 | |
• loadbin ble-sniffer_nRF51822_1.0.1_1111_Sniffer.hex, 0 | |
• r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[0x00000000]> izz | |
Do you want to print 2104 lines? (y/N) | |
vaddr=0x00000360 paddr=0x00000360 ordinal=000 sz=5 len=4 section=unknown type=ascii string=_`@\v | |
vaddr=0x00000ef2 paddr=0x00000ef2 ordinal=001 sz=6 len=5 section=unknown type=ascii string=\b%+\b\t | |
vaddr=0x00000f5e paddr=0x00000f5e ordinal=002 sz=6 len=5 section=unknown type=ascii string=\n$$@H | |
vaddr=0x00000f9e paddr=0x00000f9e ordinal=003 sz=7 len=6 section=unknown type=ascii string=\n< J% | |
vaddr=0x00000fb2 paddr=0x00000fb2 ordinal=004 sz=7 len=6 section=unknown type=ascii string=\n<0 J% | |
vaddr=0x00000fcd paddr=0x00000fcd ordinal=005 sz=7 len=6 section=unknown type=ascii string=`\n@%P\n | |
vaddr=0x00000ff2 paddr=0x00000ff2 ordinal=006 sz=7 len=6 section=unknown type=ascii string=\n$DI*} | |
vaddr=0x0000100a paddr=0x0000100a ordinal=007 sz=6 len=5 section=unknown type=ascii string=\t}@L\t |