Skip to content

Instantly share code, notes, and snippets.

server {
listen 80;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:5002;
}
}

Keybase proof

I hereby claim:

  • I am rambo on github.
  • I am rambo (https://keybase.io/rambo) on keybase.
  • I have a public key whose fingerprint is 8720 1234 F478 A1D3 C50D 0521 8BB8 8BB5 06F1 6D6F

To claim this, I am signing this object:

@rambo
rambo / SC5 hackathon 2014-03-27
Created March 27, 2014 19:08
Arduino code for soil humidity and LDR (light measurement)
// http://forum.arduino.cc/index.php/topic,37975.0.html
#define moisture_input A0
#define divider_top 7
#define divider_bottom 8
int SoilMoisture(){
int reading;
// set driver pins to outputs
@rambo
rambo / datetime_tests.py
Last active July 14, 2020 17:10
Testing/comparing pytz and dateutil for timezone handling in timezone with multiple historical UTC offsets and DST (run in interactive shell)
# http://pypi.python.org/pypi/pytz
import datetime, pytz
fmt = '%Y-%m-%d %H:%M:%S %Z%z'
hki = pytz.timezone('Europe/Helsinki')
hki
dt_n = datetime.datetime(2012, 10, 29, 10, 34, 0)
hki.utcoffset(dt_n)
td = datetime.timedelta(days=20)
dt2_n = dt - td
hki.utcoffset(dt2_n)
@rambo
rambo / enclosure.scad
Created December 18, 2011 09:04
lasercut enclosure design, triggers a bug in openscad 2011.12.13
/**
* Rough box measurements (based on the electronics board size)
*
* Height 15cm -> 10cm should be enough
* Width 30cm
* Depth 20cm
*
* Coilforms:
* 4.0” DIA
* 3.22” DIA