Skip to content

Instantly share code, notes, and snippets.

View zabacad's full-sized avatar

Ian Shearin zabacad

  • Portland, OR
View GitHub Profile
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@zabacad
zabacad / pciconf -lv
Created September 26, 2019 05:03
Netgate SG-2440
hostb0@pci0:0:0:0: class=0x060000 card=0x00000000 chip=0x1f0e8086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom processor C2000 SoC Transaction Router'
class = bridge
subclass = HOST-PCI
pcib1@pci0:0:1:0: class=0x060400 card=0x80868086 chip=0x1f108086 rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = 'Atom processor C2000 PCIe Root Port 1'
/*
* LEGO 3001
*/
$fn=32;
color("red") {
union() {
/* Main shape */
difference() {
@zabacad
zabacad / table_sizes.sql
Created September 6, 2018 17:01
PostgreSQL 9 table sizes
SELECT relname AS table_name, reltuples AS row_estimate FROM pg_class WHERE relname IN (SELECT table_name FROM information_schema.tables WHERE table_schema = 'public');
# This is Git's per-user configuration file.
[core]
excludesfile = ~/.gitignore.global
[user]
name = Ian Shearin
email = zabacad@gmail.com
[color]
ui = auto
@zabacad
zabacad / js.txt
Created September 13, 2015 04:34
JS wat
> '5' - 3
2
// Weak typing + implicit conversions = headaches.
> '5' + 3
'53'
// Because we all love consistency.
> '5' - '4'
1