mkdir -m 700 ~/.ssh; curl https://github.com/aidik.keys >> ~/.ssh/authorized_keys
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
import os | |
import shutil | |
""" | |
Steps to retrieve the IPA file from the Configurator app: | |
1. Install Apple Configurator from the Mac App Store and sign in | |
2. Connect your iOS device to your Mac | |
3. Select "Add > Apps..." and search for the app you want to install, click "Add" | |
4. The newer Apple Configurator deletes the IPA after installing it, so you'll need to use this tool to grab it |
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
######################################################################## | |
#### DEPRECATED in favor of https://github.com/deasmi/unraid-tailscale | |
######################################################################## | |
# /boot/config/go | |
# add the following... | |
# Tailscale | |
bash /boot/config/tailscale/install.sh |
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
function KickWd(){ | |
if(!BTN1.read())E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,5000); // 5 secs | |
E.enableWatchdog(20, false); // 20 secs | |
E.kickWatchdog(); | |
/* | |
// MIT License (c) 2020 fanoush https://github.com/fanoush | |
// see full license text at https://choosealicense.com/licenses/mit/ | |
var SPI2 = E.compiledC(` |
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
// -- 1. copy paste methods for flash writing and verification below to Espruino WebIDE left side | |
E.setFlags({unsafeFlash:1}); | |
var fl=require("Flash"); | |
var ladd=0;var lpg=0;var nadd=0;// last address, last page addr, next addr | |
var flash=function(a,d){ | |
if (nadd>0 && nadd<a) console.log("Hole in data, got "+a.toString(16)+", expected "+nadd.toString(16)); | |
var p=fl.getPage(a).addr; | |
if (p>lpg) {fl.erasePage(p);lpg=p;console.log("Erasing page 0x"+p.toString(16));} | |
p=fl.getPage(a+d.length-1).addr; | |
if (p>lpg) {fl.erasePage(p);lpg=p;console.log("Erasing page 0x"+p.toString(16));} |
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
diff --git a/targets/nrf5x/bluetooth.c b/targets/nrf5x/bluetooth.c | |
index e5aa77d5..5f15e041 100644 | |
--- a/targets/nrf5x/bluetooth.c | |
+++ b/targets/nrf5x/bluetooth.c | |
@@ -2489,6 +2489,7 @@ void jsble_restart_softdevice() { | |
jshUtilTimerDisable(); // don't want the util timer firing during this! | |
JsSysTime lastTime = jshGetSystemTime(); | |
jsble_kill(); | |
+ jsvUnLock(jspEvaluate("if(typeof(NRF.onRestart)=='function')NRF.onRestart();",true)); | |
jsble_init(); |
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
Basic Manual for DaFit Fitness Tracker firmware update protocol, works for nearly any nRF52832 tracker from Company DaFit | |
The minimum size of update file is 0x10000(can be filled with garbage to get to size) and the maximum size is 0x2F000 | |
the update will first get stored onto the external flash at position 0x3D1000 by the stock firmware(not by the bootloader) | |
the size of the update will get stored at 0x3D0000 on external flash with 4 bytes uint32_t | |
when bootloader gets activated it will copy the update from external flash to 0x23000 of the nRF52 internal flash. | |
Connect to device, |
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
function mandelCompJS(x,y) { | |
"compiled"; | |
var Xr = 0; | |
var Xi = 0; | |
var i = 0; | |
var Cr=(4*x/64)-2; | |
var Ci=(4*y/64)-2; | |
while ((i<32) & ((Xr*Xr+Xi*Xi)<4)) { | |
var t=Xr*Xr - Xi*Xi + Cr; | |
Xi=2*Xr*Xi+Ci; |
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.espruino.com/Reference#l_NRF_setServices | |
// https://github.com/gfwilliams/workshop-thingy52/blob/master/step5.md | |
// http://forum.espruino.com/conversations/322805/ | |
var atf={}; | |
var user=""; | |
atf.USER=function(p,t){ | |
if(p){ | |
user=p; | |
} |
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
//manual watchdog pinging mode is dangerous for Espruino Web IDE upload with 'reset() before upload' enabled | |
//you can brick your device with partial upload caused by watchdog reboot in the middle of upload | |
//E.enableWatchdog(6, false); | |
//var wdint=setInterval(function(){if(!BTN1.read())E.kickWatchdog();},1000); | |
var log=console.log; | |
Modules.addCached("HX03WLCD",function(){ | |
// commands sent when initialising the display | |
var initCmds = new Uint8Array([ | |
0xAE, // 0 disp off | |
0xD5, // 1 clk div |
NewerOlder