Skip to content

Instantly share code, notes, and snippets.

View georgehrke's full-sized avatar
👣
Off to new adventures

Georg Ehrke georgehrke

👣
Off to new adventures
  • London, UK
  • 20:26 (UTC +01:00)
View GitHub Profile
@georgehrke
georgehrke / dayview.diff
Created July 31, 2013 15:46
Patch, that replaces list view with day view (It also disables scrolling, because scrolling makes day view unusable)
diff --git a/ajax/changeview.php b/ajax/changeview.php
index bcd84a1..e3df411 100644
--- a/ajax/changeview.php
+++ b/ajax/changeview.php
@@ -12,11 +12,11 @@ $view = $_POST['v'];
switch($view) {
case 'agendaWeek':
case 'month';
- case 'list':
+ case 'agendaDay':
@georgehrke
georgehrke / 30c3.sh
Created December 31, 2013 21:26
Download all 30c3 torrents at once
parameter="";
for x in `lynx http://cdn.media.ccc.de/congress/2013/mp4/ --dump | grep "http" | grep "30c3" | cut -c 7-`; do
parameter="$parameter -O $x.torrent";
done
curl $parameter;
@georgehrke
georgehrke / test.sh
Created February 11, 2014 16:39
Arduino blinkenlights testscript
#!/bin/sh
EFFECTS=('1' '2' '4' '8' '16' '32' '64' '128');
while true; do
RED=$[ ( $RANDOM % 256 )];
GREEN=$[ ( $RANDOM % 256 )];
BLUE=$[ ( $RANDOM % 256 )];
EFFECT=${EFFECTS[$RANDOM % ${#EFFECTS[@]} ]};
@georgehrke
georgehrke / script.sh
Created April 23, 2014 11:32
Shellscript to export VTIMEZONE data from lightnings timezones.sqlite
#!/bin/zsh
num=$(sqlite3 timezones.sqlite "select COUNT(*) from tz_data where component is not null");
for i in {1..$num}
do
NAME=$(sqlite3 timezones.sqlite "select tzid from tz_data where component is not null limit 1 offset $(($i-1))");
DATA=$(sqlite3 timezones.sqlite "select component from tz_data where component is not null limit 1 offset $(($i-1))");
NAME=$(echo $NAME | tr / - | tr '[:lower:]' '[:upper:]');
NAME="timezones/$NAME.ics";
touch $NAME;
@georgehrke
georgehrke / 31c3.sh
Last active August 29, 2015 14:12
Snippet to download all 31c3 videos. This does not download the torrent but rather the video itself.
for x in `lynx http://cdn.media.ccc.de/congress/31C3/h264-hd/ --dump | grep "http" | grep "31c3" | cut -c 7-`; do
wget -nc $x;
done
BEGIN:VCALENDAR
PRODID:QIS-LSF HIS GmbH
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
for x in `lynx http://cdn.media.ccc.de/events/camp2015/h264-hd/ --dump | grep "http" | grep "cccamp15" | cut -c 7-`; do
wget -nc $x;
done
From bb82c0ca889f0f75544d1cb1089f1c1af3ee15fc Mon Sep 17 00:00:00 2001
From: Georg Ehrke <developer@georgehrke.com>
Date: Mon, 23 Mar 2015 01:05:33 +0100
Subject: [PATCH] delete cached preview when rolling back file's version
add random number using OC.parseQueryString and _.extend()
version rollback: add missing prefix to OC\Preview::post_delete
add test to assure that the rollback hook is called
@georgehrke
georgehrke / 32c3.sh
Created December 31, 2015 16:14
Snippet to download all torrents of 32c3
for x in `lynx http://cdn.media.ccc.de/congress/2015/h264-hd/ --dump | grep "http" | grep "32c3" | cut -c 7-`; do
wget -nc "$x.torrent";
done
From 7b0532958a8d862cc5139a11bba58001f2c5945a Mon Sep 17 00:00:00 2001
From: Georg Ehrke <developer@georgehrke.com>
Date: Sat, 13 Feb 2016 00:07:30 +0100
Subject: [PATCH] add repeating events to editor
---
css/eventdialog.css | 43 +-
js/.jshintrc | 1 +
js/app/controllers/calcontroller.js | 33 +-
.../controllers/eventspopovereditorcontroller.js | 2 +