Skip to content

Instantly share code, notes, and snippets.

@miloh
miloh / TFT_3.5IN_320X480_50PIN
Created March 4, 2017 19:17
geda pcb pcb-rnd smd footprint for 3.5in TFT FPC connector
Element["" "TFT_3.5IN_320X480_50PIN" "" "" 0 0 0 25000 0 100 ""]
(
ElementLine[-107480 -187007 107480 -187007 500]
ElementLine[107480 -187007 107480 147244 500]
ElementLine[107480 147244 -107480 147244 500]
ElementLine[-107480 147244 -107480 -187007 500]
Pad[48228 12982 48228 16624 1082 2000 1882 "1" "1" "square"]
Pad[46259 12982 46259 16624 1082 2000 1882 "2" "2" "square"]
Pad[44291 12982 44291 16624 1082 2000 1882 "3" "3" "square"]
Pad[42322 12982 42322 16624 1082 2000 1882 "4" "4" "square"]
table.cartouche {
border-collapse: collapse;
border: 1px solid #800000;
width: 100%;
}
table.cartouche td {
padding: 4px;
}
pre.format {
font-family: monospace;
@miloh
miloh / noisebridge-elevator-reset
Last active March 12, 2016 23:41
flowchart for resetting the elevator at noisebridge. tex file uses tkiz
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\pagestyle{empty}
% Define block styles
@miloh
miloh / tiff2pdfunite
Last active January 21, 2016 22:51
convert tif2pdf and unite pdf
#! /usr/bin/env bash
# quick convert of scantailor tiff output into single pdf.
# requires tiff2pdf and pdfunite
list=
for file in *.tif
do
filename=$(basename "$file")
extension=${filename##*.}
filename=${filename%.*}
echo "converting" $filename $extension "to pdf"
@miloh
miloh / intro2koruza.md
Last active November 18, 2015 01:13
Koruza: notes from a talk given by Luka Mustafa. Noisebridge, 17 Nov 2015
#!/bin/bash
while read word;
do
wget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=$word"
mplayer output.mp3 &> /dev/null
done
#!/bin/bash
#set -x
phrase=$1
if [ ! $2 ]
then
language="en"
else
language=$2
fi
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=$language&q=$phrase"; }
#!/bin/sh
MSG=""
until [ -z "$1" ] ; do
MSG="$MSG $1"
shift
done
curl -X POST -d say="$MSG" http://api.noisebridge.net/audio/ > /dev/null &
@miloh
miloh / sayingthings.sh
Created July 4, 2015 22:18
sayingthings was a script for irc TTS with festival, used by noisebridgers from 2010-2012
#!/bin/sh
ssh -p 9595 user@persistentserver "tail -1f irc.log.Window1" | perl -lne 'BEGIN{$|++} print "$1 says $2" if m/^[^<]+<.(\S+)> ([^[]+)$/; print "$1 $2" if m/^[^<]+ \* ((\S+) ([^[].+))$/' | while read f; do echo "(SayText \"$f\")"; done | festival
@miloh
miloh / smb-snippet
Last active August 29, 2015 14:00
config info for sharing a firmware directory on a 2014 Series 1 3D printer
[Series-1-Marlin]
path = "/home/ubuntu/marlin/"
create mask = 664 #
force create mode = 664 #
security mask = 664 # this works to mask existing upload
force security mode = 664
force directory mode = 0000
directory mask = 2775
force directory mode = 2775