Skip to content

Instantly share code, notes, and snippets.

@boecko
boecko / gist:0b0ab4b288cbd6e2aec3
Last active August 29, 2015 14:07
php simple stacktrace
function stacktrace($linesep="<br>") {
$trace = debug_backtrace();
array_shift($trace); // stacktrace entfernen
$lines = array();
foreach($trace as $call) {
$lines[] = $call['file'] . " (" . $call['function'] . ")";
}
return join($linesep, $lines) . $linesep;
}
@boecko
boecko / grep hex
Created March 22, 2011 18:56
grep for 0xc3 in files
grep -e $'\xC3' *
@boecko
boecko / ssh-host-gen
Created March 23, 2011 16:54
Host key generation
ssh-keygen -t dsa -N '' -f ssh_host_dsa_key
ssh-keygen -t rsa -N '' -f ssh_host_rsa_key
@boecko
boecko / gist:943975
Created April 27, 2011 09:28
JSON Decoding on cmdline (ruby)
curl url | ruby -e "require 'rubygems'; require 'json'; puts JSON.pretty_generate(JSON[STDIN.read]);"
cat file | ruby -e "require 'rubygems'; require 'json'; puts JSON[STDIN.read]['serverStatus']['uptime'];"
@boecko
boecko / gist:943941
Created April 27, 2011 08:46
JSON Decoding on cmdline
curl url | python -mjson.tool
@boecko
boecko / gist:1135323
Created August 9, 2011 22:05
postgresql table describe
SELECT
data_type, column_name
FROM
information_schema.columns
WHERE
table_name='table';
@boecko
boecko / breitnigge-user.css
Created January 9, 2012 13:08
breitnigge.de classic User-CSS
header > a > img {
height: 40px !important;
opacity: 0.1 !important
}
span.fn {
font-weight: bold !important;
font-size: 120% !important;
}
@boecko
boecko / dropshadow.png
Created October 23, 2012 13:25
JTRevealSidebarDemo/pull/2
dropshadow.png
@boecko
boecko / clucene-core.patch
Last active December 29, 2015 16:39
clucene-core-patch for homebrew/mavericks
--- src/CLucene/search/FieldCacheImpl.cpp~ 2008-10-23 19:44:36.000000000 +0200
+++ src/CLucene/search/FieldCacheImpl.cpp 2013-11-28 22:46:29.000000000 +0100
@@ -11,6 +11,8 @@
CL_NS_USE(index)
CL_NS_DEF(search)
+using ::wcschr;
+
FieldCacheImpl::FieldCacheImpl():
cache(false,true){
@boecko
boecko / Olympia-ARD.m3u
Last active August 6, 2016 21:10
Die ARD-Stream-URLs von Rio 2016
#EXTINF:-1,ARD Kanal 1
http://ndr_spezial-lh.akamaihd.net/i/spezial_1@119227/index_3776_av-p.m3u8
#EXTINF:-1,ARD Kanal 2
http://ndr_spezial-lh.akamaihd.net/i/spezial_2@119228/index_3776_av-p.m3u8
#EXTINF:-1,ARD Kanal 3
http://ndr_spezial-lh.akamaihd.net/i/spezial_3@119229/index_3776_av-p.m3u8
#EXTINF:-1,ARD Kanal 4
http://ndr_spezial-lh.akamaihd.net/i/spezial_4@119230/index_3776_av-p.m3u8
#EXTINF:-1,ARD Kanal 5
http://ndr_spezial-lh.akamaihd.net/i/spezial_5@384495/index_3776_av-p.m3u8