Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript">
var I18n = {
l: function() {}
};
</script>
@akirk
akirk / qtranslate_core.php.diff
Last active August 29, 2015 13:59
Proper fix for qTranslate plugin for Wordpress 3.9
diff --git i/public/wp-content/plugins/qtranslate/qtranslate_core.php w/public/wp-content/plugins/qtranslate/qtranslate_core.php
index 17b4669..b4c49cf 100644
--- i/public/wp-content/plugins/qtranslate/qtranslate_core.php
+++ w/public/wp-content/plugins/qtranslate/qtranslate_core.php
@@ -455,9 +455,9 @@ function qtrans_strftime($format, $date, $default = '', $before = '', $after = '
return $before.strftime($format, $date).$after;
}
-function qtrans_dateFromPostForCurrentLanguage($old_date, $format ='', $before = '', $after = '') {
+function qtrans_dateFromPostForCurrentLanguage($old_date, $format ='') {
@akirk
akirk / gist:5243828
Last active December 15, 2015 10:09
Petitionsunterschriften Wien
<?php
echo getNumberOfPetitionSignatures("446def6e128c4f199ddfdce70c599775"), "\n";
// oder
echo getNumberOfPetitionSignaturesCached("446def6e128c4f199ddfdce70c599775"), "\n";
function getNumberOfPetitionSignaturesCached($id) {
// aktuelles Verzeichnis muss schreibbar sein, sonst Pfad ändern
$cache = __DIR__ . "/unterschriften-$id.txt";
@akirk
akirk / .profile
Created February 26, 2013 10:09
except from my ~/.profile . i use this all the time!
# change directory to the currently open finder window.
cdf () {
currFolderPath=$( /usr/bin/osascript << EOT
tell application "Finder"
try
set currFolder to (folder of the front window as alias)
on error
set currFolder to (path to desktop folder as alias)
end try
POSIX path of currFolder