Skip to content

Instantly share code, notes, and snippets.

View ff6347's full-sized avatar
🤖
updating status…

Fabian Morón Zirfas ff6347

🤖
updating status…
View GitHub Profile

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, and monospace. Itemized lists look like:

  • this one
  • that one
@ff6347
ff6347 / minimal-johnny-five-setup.md
Created November 13, 2019 07:57
how to setup a johnny five sketch

Minimal Setup To Run Johnny Five Sketches

  1. npm init -y (make sure your folder has no wired characters e.g. äöü? or whitespace, all lowercase)
  2. npm install johnny-five
  3. Create index.js with the content below
  4. Connect your Uno Board
  5. Flash File > Examples > Firmata > StandardFirmate with Arduino IDE to the board
  6. Run your sketch with node index.js
@ff6347
ff6347 / file.csv
Last active November 13, 2019 07:37
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 3 in line 1.
BWID;BW_NAME;SHORT_BW_NAME;LONGITUDE_BW;LATITUDE_BW;COORDSYS_BW;BW_TYPE;BWATER_CAT;YEAR_BW;SAMPLE_DATE;CONC_EC;CONC_IE
DEBY_PR_FS_0187;MUEHL-SEE, NEUFAHRN B.FREISING, WASSERWACHTSHAUS;MUEHL-SEE;11.6558;48.3331;ETRS89;1;L;2009;2009-08-11;10;10
DEBY_PR_FS_0188;ANGELBERGER BADEWEIHER, ZOLLING;ANGELBERGER WEIHER;11.7903;48.4481;ETRS89;1;L;2009;2009-05-19;10;10
DEBY_PR_GAP_0192;LAUTERSEE, MITTENWALD;LAUTERSEE;11.2375;47.4403;ETRS89;1;L;2009;2009-08-17;10;10
DEBY_PR_GAP_0197;EICHSEE, GROSSWEIL;EICHSEE;11.3322;47.6797;ETRS89;1;L;2009;2009-05-25;10;10
DEBY_PR_GAP_0197;EICHSEE, GROSSWEIL;EICHSEE;11.3322;47.6797;ETRS89;1;L;2009;2009-08-17;10;10
DEBY_PR_GAP_0198;FERCHENSEE, MITTENWALD;FERCHENSEE;11.2153;47.4381;ETRS89;1;L;2009;2009-09-14;10;10
DEBY_PR_GAP_0199;FROSCHHAUSER SEE, MURNAU;FROSCHHAUSER SEE;11.2267;47.6875;ETRS89;1;L;2009;2009-04-27;10;10
DEBY_PR_GAP_0199;FROSCHHAUSER SEE, MURNAU;FROSCHHAUSER SEE;11.2267;47.6875;ETRS89;1;L;2009;2009-05-25;10;10
DEBY_PR_GAP_0199;FROSCHHAUSER SEE, MURNAU;FROSCHHAUSER SEE;11.226
@ff6347
ff6347 / url_shorten_git.io.sh
Created November 12, 2019 15:53
use git.io url shortener
http --form https://git.io "url=https://github.com/fabianmoronzirfas"
@ff6347
ff6347 / index.css
Created November 4, 2019 05:02
vanilla JS, HTML & CSS Starter setup
body {
background-color:tomato;
}
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
cd /usr/local/lib
sudo rm -rf node*
var foo = 0;
const bah = 1;
let boom = 2;
const pi = 3; // number
const pie = 42.5; // also a number
const cake = true; // boolean
const cookie = false; // also boolean
const lollipop = [1, 2, 3, 4]; // an array
const sasquatsch = { name: 'bob' }; // an object with properties
@ff6347
ff6347 / index.js
Last active September 25, 2019 06:28
async main function for JS without writing it again
void (async function main() {
console.log(foo);
})()
.catch(err => {
console.error(err);
// throw err;
})
.finally(res => {
console.log("finally");
});
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
tail -f /dev/null
@ff6347
ff6347 / large-file.sh
Last active September 19, 2019 06:51
Create a large file for testing
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
base64 /dev/urandom | head -c 5000000 > file.txt