Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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

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:

server {
listen 80;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:5002;
}
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e61faf..062914d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,7 +166,7 @@ if(VSXU_DEBUG)
add_definitions(
-g
-Wall
- -mtune=nocona
+ -march=armv8-a
@rambo
rambo / spuce.rb
Created April 7, 2017 20:51
Edited spuce formula to fix compile problems
class Spuce < Formula
desc "A C++ library for DSP filters"
homepage "http://pyspuc.com"
head "https://github.com/audiofilter/spuce.git"
url "https://github.com/audiofilter/spuce/archive/0.4.3.tar.gz"
version "0.4.3"
sha256 "5688e107b57640ba0485790d64eb16bff855f54f6fa5b2fdab568ee91f6dc687"
depends_on "cmake" => :build
depends_on :python
import time
from WSDiscovery import WSDiscovery, QName
from onvif import ONVIFCamera, ONVIFError
import urllib.parse
ONVIF_TYPE_NVT = QName('http://www.onvif.org/ver10/network/wsdl', 'NetworkVideoTransmitter')
try_auth = [
('admin', ''),
('admin', 'ms1234'),
]