Skip to content

Instantly share code, notes, and snippets.

11:27:10 berdir: WimLeers: ping
11:27:25 WimLeers: berdir: pong
11:28:38 berdir: WimLeers: did you see my e-mail? ;)
11:28:47 WimLeers: I did not
11:28:56 WimLeers: I'm very far behind on both personal and Acquia e-mail.
11:29:04 WimLeers: sorry :(
11:29:17 berdir: WimLeers: np, I just asked if I can ask you a question :p
11:29:28 WimLeers: haha
11:29:32 WimLeers: oh there it is
11:29:37 WimLeers: shoot!
<?php
class Renderer {
// unchanged relative to HEAD
public function renderRoot(&$elements) {
return $this->render($elements, TRUE);
}
#!/usr/bin/env perl
#
###########################################################################
# frameworkdeployqt.pl v.1.0.1 - a script for deploying frameworks #
# that are using Qt libs #
# #
# Copyright (C) 2009 Dominik Kapusta <d@ayoy.net> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.208
diff -u -F '^f' -r1.208 file.inc
--- includes/file.inc 30 Apr 2010 01:33:17 -0000 1.208
+++ includes/file.inc 10 May 2010 18:45:06 -0000
@@ -343,9 +343,21 @@ function file_create_url($uri) {
$scheme = file_uri_scheme($uri);
<?php
function find_element($form, $element_type) {
if (isset($form['#type']) && $form['#type'] == $element_type) {
return $form;
}
else {
foreach (element_children($form) as $name) {
if (is_array($form[$name])) {
$element = find_element($form[$name], $element_type);
if ($element !== FALSE) {
var setTextMeasure = function (contentElement, targetMeasure, maxSize, minSize) {
if (!contentElement) contentElement = document.createElement('p');
if (!targetMeasure) targetMeasure = 66;
if (!maxSize) maxSize = 16;
if (!minSize) minSize = 9;
var sizer = contentElement.cloneNode();
sizer.style.cssText = 'margin: 0; padding: 0; color: transparent; background-color: transparent; position: absolute;';
@wimleers
wimleers / qeventlogger.patch
Created October 30, 2010 08:56
Adds QEventLogger (commit: 31aae3b633c899ee7b91) to Sudoku (commit: cf6ed6c6f2bf76363549)
diff --git src/SudokuApp.cpp src/SudokuApp.cpp
index 3232b0f..18ae303 100644
--- src/SudokuApp.cpp
+++ src/SudokuApp.cpp
@@ -42,6 +42,10 @@ SudokuApp::SudokuApp(int & argc, char ** argv) : QApplication(argc, argv) {
m_mainWindow = new MainWindow();
m_mainWindow->show();
+
+ // Initialize & install the event logger.
@wimleers
wimleers / crontab
Created November 1, 2010 00:00
DriverPacks.net server crontab file
#
# Normal cronjobs.
# m h dom mon dow command
#
# Regenerate torrents.tar.gz every hour.
*/60 * * * * tar -cvzf /data/www/svn_driverpacks.net/files/torrents.tar.gz /data/www/svn_driverpacks.net/files/torrents/*.torrent
# Run DriverPacks CDN and seedbox rsync scripts (for downloads)
*/20 * * * * /home/wim/cronscripts/dps-cdn-rsync.sh
@wimleers
wimleers / .htaccess
Created November 2, 2010 13:29
Improved .htaccess for Drupal.
# Disable the server signature.
ServerSignature Off
# No-www.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@wimleers
wimleers / opentracker-reload-whitelist.sh
Created November 19, 2010 14:12
Send a signal to opentracker to reload its whitelist
#!/bin/sh
kill -s HUP `pidof opentracker`