This file contains 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
// g++ -Ofast -march=native -Wall -Wextra testmap.cc -o testmap && time ./testmap | |
#include <iostream> | |
#include <cmath> | |
#include <sys/time.h> | |
long map_test(long x, long in_min, long in_max, long out_min, long out_max) { | |
long in_length = in_max - in_min; | |
long out_length = out_max - out_min; |
This file contains 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
#!/bin/sh | |
test -z "$2" && { echo "syntax: $0 <PR-number> <temporary-name>"; exit 1; } | |
set -ex | |
git checkout master | |
git branch -D pr-$1-$2 | |
git fetch origin pull/$1/head:pr-$1-$2 | |
git checkout pr-$1-$2 | |
set +x | |
echo "### Pull request #$1 should be here in current branch 'pr-$1-$2':" | |
git branch | grep pr-$1-$2 |
This file contains 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
# | |
# -- Arduino boards.txt parser for FQBN details -- | |
# | |
# random example: | |
# esp8266com:esp8266:d1:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=460800 | |
# | |
# description of possible values in configurable menu entries: | |
# (run with '--machine' for machine version) | |
# | |
# |
This file contains 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
/* This linker script generated from xt-genldscripts.tpp for LSP . */ | |
/* Linker Script for ld -N */ | |
PHDRS | |
{ | |
dport0_0_phdr PT_LOAD; | |
dram0_0_phdr PT_LOAD; | |
dram0_0_bss_phdr PT_LOAD; | |
iram1_0_phdr PT_LOAD; | |
irom0_0_phdr PT_LOAD; | |
} |
This file contains 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://github.com/esp8266/Arduino/issues/1923 | |
// https://github.com/esp8266/Arduino/issues/4213 | |
// compatible with lwip-v1 and -v2 | |
// no need for #include | |
struct tcp_pcb; | |
extern struct tcp_pcb* tcp_tw_pcbs; | |
extern "C" void tcp_abort (struct tcp_pcb* pcb); | |
void tcpCleanup () |