Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#
# https://github.com/vivien/i3blocks-contrib/tree/master/kbdd_layout
#
# i3 config
# [kbdd_layout]
# command=$HOME/bin/kbdd_layout
# interval=persist
# markup=pango
#
radiation_sign(10, $fn=770);
module radiation_sign(h=2) {
linear_extrude(height=h)
radiation_sign_2d();
}
module radiation_sign_2d() {
circle(20);
rotate([0,0,90]) radiation_sign_sector();
// Water tap handle
// Print with PLA
$fn = 40;
stem_height = 6;
stem_d = 7.5;
stem_cut = 6;
screw_height = stem_height+2;
screw_hole_d = 4;
@plumbum
plumbum / sector.scad
Created July 12, 2017 08:59
How to make cylinder sector in OpenSCAD
translate([0,0,0]) sector(30, 20, 10, 90);
translate([22,0,0]) sector(30, 20, 300, 30);
translate([0,22,0]) sector(30, 20, 30, 300);
translate([22,22,0]) sector(30, 20, 10, 190);
module sector(h, d, a1, a2) {
if (a2 - a1 > 180) {
difference() {
cylinder(h=h, d=d);
translate([0,0,-0.5]) sector(h+1, d+1, a2-360, a1);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am plumbum on github.
  • I am plumbum (https://keybase.io/plumbum) on keybase.
  • I have a public key whose fingerprint is 389C 69BF 88FD A63A A412 686C F709 AB9B 8FA9 A333

To claim this, I am signing this object:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define SEALEVELPRESSURE_HPA (1013.25)
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
Adafruit_BME280 bme; // I2C
ivan@jobber:/:$ sudo hdparm -t /dev/sda # SSD
/dev/sda:
Timing buffered disk reads: 1096 MB in 3.00 seconds = 365.29 MB/sec
ivan@jobber:/:$ sudo hdparm -t /dev/sdb # WD Black 1TB
/dev/sdb:
Timing buffered disk reads: 394 MB in 3.00 seconds = 131.28 MB/sec
ivan@jobber:/:$ sudo hdparm -t /dev/sdc # WD Green 512GB
<?php
define('USE_LINK', true);
$start_time = microtime(true);
$array = array();
for($i =0; $i < 100000; $i++) {
$array[] = array(
'mem' => memory_get_usage(),
#!/bin/sh
# Setup PCA9535
i2cset -y i2c-gpio0 0x20 2 0xFF
i2cset -y i2c-gpio0 0x20 6 0xFF
i2cset -y i2c-gpio0 0x20 3 0xFF
i2cset -y i2c-gpio0 0x20 7 0x0F