Skip to content

Instantly share code, notes, and snippets.

View twei55's full-sized avatar

Tobias Weiß twei55

  • Berlin, Germany
View GitHub Profile
@twei55
twei55 / fdi-advanced-eo-browser.js
Last active March 15, 2023 10:52
Custom script to calculate FDI (Floating Debris Index) in EO-Browser (Advanced version)
/*
Calculation of Floating Debris Index (FDI)
For more information see https://www.nature.com/articles/s41598-020-62298-z
*/
// S-2A Central Wavelength (nm)
const waveLengthRed = 664.6
const waveLengthNIR = 832.8
const waveLengthSWIR = 1613.7
@twei55
twei55 / fdi-eo-browser.js
Last active March 14, 2023 14:26
Custom script to calculate FDI (Floating Debris Index) in EO-Browser
/*
Calculation of Floating Debris Index (FDI)
For more information see https://www.nature.com/articles/s41598-020-62298-z
*/
// S-2A Central Wavelength (nm)
const waveLengthRed = 664.6
const waveLengthNIR = 832.8
const waveLengthSWIR = 1613.7
@twei55
twei55 / docker_cmds.md
Last active March 31, 2023 10:24
Docker Commands

Docker Logs Grep

docker logs nginx 2>&1 | grep "127."

Last 1000 entries in docker logs

docker logs -f --tail 1000 container_name
@twei55
twei55 / influx.md
Last active June 22, 2023 16:09
InfluxDB commands

Drop all series

DROP SERIES FROM /.*/

Drop all series starting with A

DROP SERIES FROM /^A+/
@twei55
twei55 / linux-commands.md
Last active April 15, 2024 09:34
Linux Commands

Create tar.gz file with tar command

tar -czvf filename.tar.gz /path/to/folder

Untar tar.gz file

tar -zxvf filename.tar.gz /path/to/folder
@twei55
twei55 / mac-commands.md
Last active September 2, 2021 13:19
MacOSX Commands

Split one file into multiple files

split -l 250000 words.csv

Too many open files

ulimit -Sn 10000