Skip to content

Instantly share code, notes, and snippets.

@mrb
mrb / pizza_dough.markdown
Last active January 5, 2022 16:05
Best pizza dough
  • 1 2lb bag good AP flour
  • 1 active dry yeast packet
  • 25 grams salt
  • 600 grams water (just over 2 cups)

Mix the salt, yeast, water and about 3/4 of the flour with the paddle attachment (on your stand mixer, or you can try it by hand which I've never done) for about a minute until it is all mixed, it should be pretty loose.

Let it sit, covered, for about 20 minutes.

Knead it on low for 5-7 minutes, until it starts to even out in texture, then start adding the rest of the flour until the dough starts to pull away from the bowl. It should still be pretty wet though. Knead for another 5-7 minutes on med-low, let it rest again for 20 minutes, then remove it to a floured bench, work it with your hands, shape it, and cut it into 4-5 even sized balls.

@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else

!SLIDE

Monads in Erlang

monads are simple

!SLIDE

a monad is a monoid in the category of endofunctors

@dysinger
dysinger / vlc-stream-desktop-to-mp4.sh
Created March 7, 2012 01:40
Stream your desktop with VLC (screencam)
# stream video from your desktop & audio from another device into an h264/mp3 avi video with VLC
vlc screen:// --screen-fps=12 \
--input-slave=alsa://hw:1,0 \
--qt-start-minimized \
--sout "#transcode{venc=x264,vcodec=h264,fps=12,vb=640,acodec=mp3,channels=1,ab=64}\
:std{access=file,mux=mp4,dst=screencam-$(date -u +%Y-%m-%d-%s).avi}"
require 'ffi'
require 'jnr-enxio-0.1.jar'
module Open
extend FFI::Library
ffi_lib 'c'
attach_function :open, [:string, :int], :int
end
> for accept in `strings dump.pcap | grep -i ^Accept- | cut -f 1 -d':' | sort | uniq`; do echo "==> $accept"; strings dump.pcap | grep -i $accept | sort | uniq -c | sort -n | tail -10; done
==> Accept-Charset
4 Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7
6 Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.3
6 Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
7 Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
8 Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
8 Accept-Charset: UTF-8,*
11 Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
69 Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7
class SocketPool
def initialize
@sockets = Hash.new { |h,k| h[k] = [] }
@mutex = Mutex.new
end
def checkout(host, port)
@mutex.synchronize do
sockets = @sockets[host][port]
-module(test_helper).
-export([riak_test/1]).
riak_test(Fun) ->
start_riak(),
{ok, Riak} = riak:local_client(),
Ret = (catch Fun(Riak)),
stop_riak(),
case Ret of