Skip to content

Instantly share code, notes, and snippets.

$ git log
commit 9f0349d992f1c3e7f278096d27cd13d8d990c2df
Author: Franz Bettag <[email protected]>
Date: Fri Nov 12 20:46:19 2010 +0100
Now finally does frickin pull first.
commit 1cc98b07391383addc5b998b4fcf1e5a4233faad
Author: Franz Bettag <[email protected]>
Date: Wed Nov 10 10:37:22 2010 +0100
$ git log --graph --decorate --pretty=oneline --abbrev-commit --all
* 9f0349d (HEAD, origin/master, origin/HEAD, master) Now finally does frickin pull first.
* 1cc98b0 Added auto-update.
* 405970a Initial import.
$ git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
$ git lol
* 9f0349d (HEAD, origin/master, origin/HEAD, master) Now finally does frickin pull first.
* 1cc98b0 Added auto-update.
* 405970a Initial import.
@fbettag
fbettag / arch.install
Created December 22, 2010 16:03
arch domU install script
#! /bin/bash
# new arch-domU install
#
# Copyright (c) 2010, Franz Bettag <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@fbettag
fbettag / nginx
Created January 3, 2011 23:48
nginx ./configure for lua and redis
--add-module=/exploits/home/fbettag/ngx_devel_kit \
--add-module=/exploits/home/fbettag/lua-nginx-module \
--add-module=/exploits/home/fbettag/redis2-nginx-module \
--add-module=/exploits/home/fbettag/set-misc-nginx-module \
@fbettag
fbettag / gist:764194
Created January 3, 2011 23:51
redis.conf
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
bind 127.0.0.1
# By default Redis asynchronously dumps the dataset on disk. If you can live
# with the idea that the latest records will be lost if something like a crash
# happens this is the preferred way to run Redis. If instead you care a lot
# about your data and don't want to that a single record can get lost you should
# enable the append only mode: when this mode is enabled Redis will append
@fbettag
fbettag / gist:764201
Created January 3, 2011 23:55
nginx.conf redis
location /redis {
internal;
redis2_query get $request_uri;
set_unescape_uri $query $arg_query;
redis2_raw_query $query;
redis2_pass 127.0.0.1:6379;
}
@fbettag
fbettag / foo.sql
Created January 9, 2011 06:01
powerdns query - before
pdns=> explain analyze select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='uberblo.gs';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on dns_records (cost=4.30..18.54 rows=1 width=49) (actual time=3.453..3.460 rows=1 loops=1)
Recheck Cond: ((name)::text = 'uberblo.gs'::text)
Filter: (upper((type)::text) = 'SOA'::text)
-> Bitmap Index Scan on index_dns_records_name (cost=0.00..4.30 rows=6 width=0) (actual time=0.065..0.065 rows=6 loops=1)
Index Cond: ((name)::text = 'uberblo.gs'::text)
Total runtime: 3.497 ms
@fbettag
fbettag / after.sql
Created January 9, 2011 06:02
powerdns query - after
pdns=> explain analyze select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='uberblo.gs';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using index_dns_records_name_active_rtype_zone on dns_records (cost=0.00..8.27 rows=1 width=49) (actual time=0.118..0.179 rows=1 loops=1)
Index Cond: (((name)::text = 'uberblo.gs'::text) AND ((type)::text = 'SOA'::text))
Total runtime: 0.298 ms
(3 rows)
@fbettag
fbettag / build_for_iphoneos.sh
Created April 13, 2011 20:09
libsox compile script for iPhoneOS/iOS
#!/bin/bash
################################################################################
#
# Copyright (c) 2008-2009 Christopher J. Stawarz
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,