This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import alsaaudio, time, audioop | |
import sys | |
import piggyphoto | |
# init camera | |
try: | |
C = piggyphoto.camera() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wget_github { | |
GHUSER=$1 | |
GHREPO=$2 | |
wget --no-check-certificate "https://nodeload.github.com/$GHUSER/$GHREPO/tarball/master" -O "./$GHUSER-$GHREPO.tar.gz" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace view public.size_schemata as | |
select table_schema, | |
pg_size_pretty(sum(pg_total_relation_size(table_schema || '."' || table_name || '"')::bigint)::bigint) As fulltblsize, | |
pg_size_pretty(sum(pg_relation_size(table_schema || '."' || table_name || '"')::bigint)::bigint) As justthetblsize | |
from information_schema.tables | |
where table_catalog = current_database() | |
group by table_schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function public.hexcolor_to_mapserver(hexcolor text) returns text as | |
$body$ | |
declare | |
thexcolor text; | |
color_r int; | |
color_g int; | |
color_b int; | |
begin | |
thexcolor := trim(both ' ' from hexcolor); | |
if not thexcolor ~ '^#[0-9a-fA-F]{6}$' then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
TSTAMP=$(date +%Y%m%d-%H%M%S) | |
INDIR="$1" | |
OUTFILE_BASE=$(echo "$INDIR" | sed 's/-unpacked//g' | sed 's/.odt//g') | |
OUTFILE="$OUTFILE_BASE.odt" | |
[ -d $INDIR ] || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
TSTAMP=$(date +%Y%m%d-%H%M%S) | |
ODFFILE=$1 | |
ODFDIR="$ODFFILE-unpacked" | |
[ -f "$ODFFILE" ] || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://photography-on-the.net/forum/showthread.php?t=879433 | |
http://photography-on-the.net/forum/showthread.php?t=929789 | |
http://www.pixtus.com/forum/product-reviews/138424-benro-trcb069-travel-angel.html | |
http://www.benro.de/stative/travelangel.htm | |
http://www.canonclubitalia.com/public/forum/Benro-Travel-Angel-recensioni-con-t351810.html | |
http://blog.sebastianbober.com/2011/10/15/gear-review-giottos-vitruvian-vgrn8265-with-5501-652-ball-head/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copy only the .svn diretories form all subdirs | |
rsync -avP --include="*/" --include='.svn/***' --exclude='*' from/ to/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Go-like defer statement (C++11) | |
* | |
* g++ --std=c++0x -o def def.cc | |
* | |
* also see http://blog.korfuri.fr/post/go-defer-in-cpp/ | |
*/ | |
#include <functional> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate a changelog from git tags | |
TAGLIST=`git tag | grep -E '^v[0-9]+' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -r | awk '{print $4}'` | |
LAST_IN_LIST=HEAD | |
echo "Changelog" | |
echo "---------" | |
echo "" |