Skip to content

Instantly share code, notes, and snippets.

@zed9h
zed9h / .gitignore
Last active December 9, 2015 18:05
/backbone.js
/baseMarkers.js
/bed.png
/compass_lower-left.png
/compass_lower-right.png
/compass_upper-left.png
/compass_upper-right.png
/control-bg-active.png
/control-bg.png
/icons
@zed9h
zed9h / ammap.css
Last active August 29, 2015 14:26
world map with the last decades migration between countries (UN data https://docs.google.com/spreadsheets/d/1_lFkPHLNK8fKkqTc-3Ytgz9IIP55Kmn1RNNl3TquG44/edit#gid=1209937416)
.ammapAlert
{
display:table-cell;
vertical-align:middle;
text-align:center;
font-family:verdana,helvetica,arial,sans-serif;
font-size:12px;
color:#CC0000;
}
@zed9h
zed9h / pangram-ligatures-and-other-font-stress-tests.txt
Last active May 17, 2018 07:55
text to speech pronunciation challenge. speech synthesis test sample. font stress test sample.
Panagrams, ligatures and other font stress tests
Hamburgefonstiv
#123,456.7890mph
1lIi, 2z, 3E, 4yuA, 5sS, 6bG, 7L, 8B, 9g, 0Oo
bdpq
"…", “…”, ‘…’,:;.!? () {} []
- hyphen, – en dash, — em dash
SAMPLE KERNING PAIRS
AT AV AW AY Av Aw Ay Fa Fe Fo Kv Kw Ky LO LV LY PA Pa Pe Po TA
@zed9h
zed9h / purge.c
Last active August 29, 2015 14:06
Does your Mac OSX 10.9.4 Mavericks do a bad job at memory management? Use this script to force it to free some memory. Run it passing the amount of gigs of ram you have (default 8gb) and [optionally] wait the chart on the Memory tab of Activity Monitor to display some yellow and red.
#if 0
BIN=`mktemp $0.bin.XXXX`
trap "rm -fv $BIN" 0
gcc -O3 $0 -Wall -Werror -o $BIN && $BIN $1
exit
#endif
#include<stdio.h>
#include<stdlib.h>
@zed9h
zed9h / ws-bench.txt
Created August 13, 2012 22:00
helloworld microbenchmark of 3 webserver interfaces: perl/twiggy, ruby/rack, python/cyclone
Hello Word benchmark.
diff -Nr -U5 _/cyclone/hello.py ./cyclone/hello.py
--- _/cyclone/hello.py 1970-01-01 00:00:00.000000000 +0000
+++ ./cyclone/hello.py 2012-08-11 23:45:04.562124694 +0000
@@ -0,0 +1,11 @@
+import cyclone.web
+
+
+class MainHandler(cyclone.web.RequestHandler):
@zed9h
zed9h / make-multi-boot-usb.sh
Created May 27, 2011 22:19
Boot USB pendrive with multiple CD ISO images
# http://www.panticz.de/MultiBootUSB
sudo mkfs.vfat -n zed9h /dev/sdb1
mount /dev/sdb1 /mnt/
grub-install --no-floppy --root-directory=/mnt /dev/sdb1
cat <<EOF> /mnt/boot/grub/grub.cfg
@zed9h
zed9h / blender-2.49a+dfsg-libswscale.so.0.7.1-fix-mov-export.patch
Created February 9, 2011 22:25
Fix the jagged MOV output on Blender 2.49a (something to do with libscale 0.7.1 BGR32 format, that does not happen with RGB32)
--- blender-2.49a+dfsg/source/blender/imbuf/intern/anim.c.orig 2010-02-17 01:29:57.221381687 -0200
+++ blender-2.49a+dfsg/source/blender/imbuf/intern/anim.c 2010-02-17 01:30:01.810124170 -0200
@@ -640,11 +640,11 @@
anim->pCodecCtx->width,
anim->pCodecCtx->height,
anim->pCodecCtx->pix_fmt,
anim->pCodecCtx->width,
anim->pCodecCtx->height,
- PIX_FMT_BGR32,
+ PIX_FMT_RGB32,
@zed9h
zed9h / vmplayer-3.1.3-fix-on-kernel-2.6.37.sh
Created February 9, 2011 22:19
Fix to the vmplayer 3.1.3 to work with vanilla linux kernel 2.6.37
#!/bin/bash
DIR=/usr/lib/vmware/modules/source
BKP=backup-$(date +%Y%m%d-%H%M%S)
cd $DIR || exit
ls *tar | xargs -n1 tar xf || exit
patch --batch --force -p1 <<'EOF'
diff -r -U5 orig//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h
--- orig//vmci-only/include/compat_semaphore.h 2010-11-11 18:02:54.000000000 -0200
+++ patched//vmci-only/include/compat_semaphore.h 2011-02-09 18:37:46.833736668 -0200
@@ -26,11 +26,11 @@
@zed9h
zed9h / list-blocks-from-file-through-inode.c
Created July 23, 2010 10:06
list ext2 data blocks from a filesystem and file path through it's inode, using two methods
// gcc -l ext2fs % -pg && ./a.out dummy.ext2 a/4
#include <ext2fs/ext2fs.h>
#include <stdio.h>
int blk_iterate(ext2_filsys fs, blk_t *blocknr, int blockcnt, void *priv_data)
{
printf("blk(%d)=%d\n", blockcnt, *blocknr);
return 0;
}