Skip to content

Instantly share code, notes, and snippets.

<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery.noConflict();
var jq = jQuery;
jq.ajax({
url: '/rss',
type: 'GET',
dataType: 'xml',
error: function (xhr, status, e) {
@till
till / test.php
Created September 23, 2010 16:22
<?php
// ...
if (!$memcached->connect($_Auth_OpenID_memcache_test_host)) {
print "(skipping memcache store tests - couldn't connect)";
$this->pass();
}
this_dir = File.dirname(__FILE__)
chef_dir = "#{this_dir}/chef-solo"
if !File.exist?(chef_dir) then
Dir.mkdir(chef_dir)
end
file_cache_path "#{chef_dir}"
cookbook_path [ "#{chef_dir}/cookbooks" ]
role_path "#{chef_dir}/roles"
<?php
class Tester
{
private static $foo;
public function __construct()
{
self::$foo = true;
}
@till
till / setup-percona-server.sh
Created October 21, 2010 00:38
A small shell script to install percona-server (and -client).
#!/bin/sh
############################
# Author: Till Klampaeckel #
# License: New BSD License #
############################
version=$1
if [ "x$version" = "x" ]; then
echo "Usage: ./$0 5.0|5.1"
<?php
$foobar = 'dwin r';
if (($foo = apc_fetch('foo', $success))) { // === true < stops working
var_dump($foo, $success);
}
if ($success === false) {
echo "STORING";
var_dump(apc_store('foo', $foobar));
}
<?php
$_class = '';
if($IDOutsideLoop == $post->ID) {
$_class .= ' class="leftcurrent" ';
}
?>
<li>
<a href="<?php the_permalink() ?>"<?php echo $_class; ?>rel="bookmark" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
@till
till / gist:715511
Created November 25, 2010 15:07 — forked from anonymous/gist:715357
#!/usr/bin/php -q
<?php
define("DBHOST", "localhost");
define("DBUSER", "-mydb");
define("DBPASS", "");
define("DEFAULT_DB", "-mydb");
define("MAILER_TABLE", "mail_queue");
define("MAILER_LOCK_FILE", "/tmp/mailer_queue.lock");
(see the transcript file for additional information)
Output written on buch.dvi (45 pages, 161428 bytes).
Transcript written on buch.log.
This is makeindex, version 2.15 [TeX Live 2009] (kpathsea + Thai support).
Scanning style file ./gp.ist...................done (19 attributes redefined, 0 ignored).
Scanning input file buch.idx...done (0 entries accepted, 0 rejected).
Nothing written in buch.ind.
Transcript written in buch.ilg.
buch.dvi -> CouchDB.pdf
Problem:
\begin{gpListing}
[foo]
\end{gpListing}
=> [foo] wird nicht angezeigt
Loesung: