Skip to content

Instantly share code, notes, and snippets.

View psiphi75's full-sized avatar

Simon Werner psiphi75

View GitHub Profile

Keybase proof

I hereby claim:

  • I am psiphi75 on github.
  • I am psi42 (https://keybase.io/psi42) on keybase.
  • I have a public key ASAniV7nttatoTaNhgDIzAECYGeY-vJjJ_84tIAS-8dVEAo

To claim this, I am signing this object:

@psiphi75
psiphi75 / vendors.csv
Last active March 4, 2020 02:13
Serverless Cloud Vendor Pricing
Vendor Total monthly cost (1000000 requests)
AWS Lambda $4.53
Azure Functions $1.00
Google Cloud Functions $1.33
IBM OpenWhisk $0.83
Cloudflare (edge) $0.50
AWS EC2 (cheap server - t2.micro) $10.69
@psiphi75
psiphi75 / vendors.csv
Created March 4, 2020 02:10
Serverless Cloud Vendor Pricing
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 2 in line 1.
Vendor, Total monthly cost (1,000,000 requests)
AWS Lambda,$4.53
Azure Functions,$1.00
Google Cloud Functions,$1.33
IBM OpenWhisk,$0.83
Cloudflare (edge),$0.50
AWS EC2 (cheap server, t2.micro),$10.69
@psiphi75
psiphi75 / setup-ais.sh
Last active April 14, 2022 23:39
Make an AIS listening station using RTL-SDR (RTL2832U) on Ubuntu 18.04
#!/bin/bash
# Get CubicSDR
sudo apt install librtlsdr0 cubicsdr
# Need to calibrate the ppm (part per million) value. Getting an accurate calibration is critical. Find a frequency that works. For me 785.5 MHz seems to do well, there is a dip in noise just at that frequency, with an occasional spike.
# I use the follow website to find exact frequencies of cell signals.
# https://gis.geek.nz/celltowers
function memoize(fn) {
return function() {
var args = Array.prototype.slice.call(arguments);
fn.cache = fn.cache || {};
return fn.cache[args]
? fn.cache[args]
: (fn.cache[args] = fn.apply(this, args));
};
}
@psiphi75
psiphi75 / Bench.js
Last active November 28, 2018 22:19
function memoize(fn) {
return function() {
var args = Array.prototype.slice.call(arguments);
fn.cache = fn.cache || {};
return fn.cache[args]
? fn.cache[args]
: (fn.cache[args] = fn.apply(this, args));
};
}
@psiphi75
psiphi75 / jsconfig.json
Created July 23, 2018 04:56
Implementing TypeScript + JSDoc + ESLint + Prettier
{
"compilerOptions": {
"target": "es2016",
"checkJs": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "node"
},
"exclude": ["node_modules"]
}
@psiphi75
psiphi75 / .prettierrc
Created July 23, 2018 04:52
TypeScript + JSDoc + ESLint + Prettier.
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "es5"
}
@psiphi75
psiphi75 / .eslintrc.js
Last active July 26, 2018 21:02
TypeScript + JSDoc + ESLint + Prettier. ESLint rc file.
module.exports = {
env: {
'es6': true,
'node': true,
},
extends: 'airbnb-base',
plugins: ['jsdoc', 'prettier'],
rules: {
'prettier/prettier': 'error',
@psiphi75
psiphi75 / rPi3-ap-setup.sh
Last active January 7, 2018 20:02 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 wifi access-point-setup (AP) and internet sharing over ethernet
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi