Skip to content

Instantly share code, notes, and snippets.

Welcome

You scanned my messed up qr code. Fork this gist and leave me a message after the sound.

toot

@elektrowolle
elektrowolle / readme.md
Last active October 12, 2021 15:46
IP and Port scanner in bash and nc
const ips = [
"192.168.0.1",
"192.168.0.2",
"192.168.1.1",
"192.168.2.1",
"172.16.2.1",
"172.16.2.2",
"172.16.2.10",
"172.16.2.20",
]
@elektrowolle
elektrowolle / hashcash_emscripten_make.sh
Last active February 25, 2018 23:40
emscripten hashcash
emcc hashcash.c libhc.c lib*.c sdb.c utct.c lock.c fastmint_ansi_*.c fastmint_altivec_*.c fastmint_mmx_*.c random.c -O3 -o hashcash.js
@elektrowolle
elektrowolle / run2.ino
Last active November 18, 2017 21:00 — forked from sveinb/run2.ino
#define HZ 60.
#define ELE_IN 12
#define ELE_OUT 11
#define WINCH_OUT 10
#define THRUST_IN 9
#define AIL_IN 8
#define AIL_L_OUT 7
#define AIL_R_OUT 6
@elektrowolle
elektrowolle / auth.h
Last active January 16, 2017 13:38
Lora_step_1
// This EUI must be in little-endian format, so least-significant-byte
// first. When copying an EUI from ttnctl output, this means to reverse
// the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3,
// 0x70.
static const u1_t PROGMEM APPEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
// This should also be in little endian format, see above.
static const u1_t PROGMEM DEVEUI[8]={ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
// This key should be in big endian format (or, since it is not really a
@elektrowolle
elektrowolle / gist:8453b90743eb75ce3b23
Last active January 5, 2017 22:57
Simple Linked List
template <typename Type> class List {
public:
Type value;
List* previousItem;
List* nextItem;
List ( Type value, List *previous = NULL ) {
this->set (value);
this->previousItem = NULL;
this->nextItem = NULL;
class Path{
Path followingPath;
PVector start;
PVector end;
Float startAngle;
Float endAngle;
Path(PVector start, PVector end, Float startAngle, Float endAngle){
this.start = start;
this.end = end;
function sngltonFactory(_cb, _isFaultyCb){
let o = {snglton: _cb()};
_isFaultyCb = _isFaultyCb || ((c)=>typeof c == "undefined");
return function (){
const a = o;
if(_isFaultyCb(a.snglton)) {
a.snglton = _cb();
}
return a.snglton
}
@elektrowolle
elektrowolle / Braile.js
Last active March 29, 2016 15:53
braile converter
var endOfLine = '\r\n';
Braile = {};
Braile.en = {};
Braile.en.alphabet = {
"a" : "o- -- --",
"b" : "o- o- --",
"c" : "oo -- --",
"d" : "oo -o --",
"e" : "o- -o --",
"f" : "oo o- --",