Skip to content

Instantly share code, notes, and snippets.

View jayeye's full-sized avatar

jayeye

View GitHub Profile
stat("/etc/fonts/fonts.conf", {st_mode=S_IFREG|0644, st_size=2339, ...}) = 0
stat("/etc/fonts/conf.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/fonts/conf.d/00kde.conf", {st_mode=S_IFREG|0644, st_size=124, ...}) = 0
stat("/etc/fonts/conf.d/10-antialias.conf", {st_mode=S_IFREG|0644, st_size=223, ...}) = 0
stat("/etc/fonts/conf.d/10-hinting-slight.conf", {st_mode=S_IFREG|0644, st_size=229, ...}) = 0
stat("/etc/fonts/conf.d/10-hinting.conf", {st_mode=S_IFREG|0644, st_size=212, ...}) = 0
stat("/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", {st_mode=S_IFREG|0644, st_size=2010, ...}) = 0
stat("/etc/fonts/conf.d/11-lcdfilter-default.conf", {st_mode=S_IFREG|0644, st_size=526, ...}) = 0
stat("/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans-mono.conf", {st_mode=S_IFREG|0644, st_size=874, ...}) = 0
stat("/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans.conf", {st_mode=S_IFREG|0644, st_size=864, ...}) = 0
@jayeye
jayeye / mkvpc.py
Created September 10, 2016 06:16
Create a vpc with all its accoutrements
#!/usr/bin/env python3
from __future__ import print_function
import boto3
import ipaddress
import sys
import time
ec2 = boto3.client('ec2')
@jayeye
jayeye / fdtdump__sys_firmware_fdt
Last active May 12, 2016 19:07
I2S microphone input on Pi2/Pi3 woes
/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x37b3 (14259)
// off_dt_struct: 0x38
// off_dt_strings: 0x31c0
// off_mem_rsvmap: 0x28
// version: 17
// last_comp_version: 16
// boot_cpuid_phys: 0x0
// size_dt_strings: 0x5f3
@jayeye
jayeye / fil.py
Last active August 29, 2015 14:17
Convert filament length to filament weight and vice versa
PLA = 1.24
ABS = 1.03
def _normalize_density(d):
"""Density can be specified as g/cm^3 (common way) or kg/m^3 (SI way).
Assumes we are not dealing with degenerate matter!
"""
return (d < 25) and (d * 1000) or d
@jayeye
jayeye / etherspeed
Created November 1, 2014 06:00
Quick-and-dirty program to show network traffic rate on a mac, updating once a second.
#!/usr/bin/env python2.7
from __future__ import print_function
import subprocess
import time
def netstat():
ifs0 = subprocess.check_output(['/usr/sbin/netstat', '-b', '-i'])
retval = dict()
for i in ifs0.splitlines():