Skip to content

Instantly share code, notes, and snippets.

@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 / dps-cdn-rsync.sh
Created October 31, 2010 23:58
Script that syncs a directory recursively to a Push CDN using rsync.
#!/bin/sh
LOGFILE=/data/logs/dps-cdn-rsync/$(date "+%Y-%m").log
# Append a header first, so we know when this script was run.
date "+%n%n=====%nSyncing DriverPacks to CDN at %Y-%m-%d %H:%M:%S" >> $LOGFILE
# Now perform the actual syncing, still appending to the logfile.
rsync -avv --progress --delete --exclude lost+found --exclude .ssh --exclude .bash_history /data/www/downloadsorigin.driverpacks.net/ [email protected]:/home/dpsdl.drupalcdn/public_html/ >> $LOGFILE
@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.
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;';
<?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) {
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);
#!/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 <[email protected]> #
# #
# 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 #