Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
Y.io(uri, { | |
on: { | |
success: function (txnid, res) { | |
Y.one('#container').set('innerHTML', res.responseText); | |
}, | |
failure: function (err, res) { | |
Y.log(res.status + ":" + res.statusText); | |
} | |
} | |
}); |
find . -iname "*.php" > /tmp/my_theme_file_list.txt | |
# new template | |
xgettext --from-code=utf-8 -d my_theme -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot | |
# update template | |
xgettext --from-code=utf-8 -d my_theme -j -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot |
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
<?php | |
// STEP 1: read POST data | |
// Reading POSTed data directly from $_POST causes serialization issues with array data in the POST. | |
// Instead, read raw POST data from the input stream. | |
$raw_post_data = file_get_contents('php://input'); | |
$raw_post_array = explode('&', $raw_post_data); | |
$myPost = array(); | |
foreach ($raw_post_array as $keyval) { |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
/* BEGIN PODCASTING FILTER HOOKS */ | |
function example_add_itunes_namespace( ) | |
{ | |
if (get_post_type()==='podcast') { | |
echo 'xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"'; | |
} | |
} |
/* slide down details list */ | |
@keyframes slideDown { | |
0% { | |
opacity: 0; | |
height: 0; | |
} | |
100% { | |
opacity: 1; | |
height: 20px; | |
} |
#!/bin/bash | |
# Convert TCX (Garmin Edge) to GPX with gpsbabel | |
# Usage: tcx2gpx tcx-file-name [-o gpx-file-name] -max 999 | |
# -o -- gpx-file-name, if not given, computed from tcx-file-name (it is assumed YYYY-MM-DD*.tcx) | |
# -max -- produce simplified track with maximum 999 trkpoints | |
# | |
SIMPLIFY="" | |
if [ $# -eq 0 ]; then |
#!/usr/bin/python | |
from __future__ import print_function | |
import sys, xml.parsers.expat, sys | |
import pystache | |
if len(sys.argv) != 3: | |
print('usage: convopml.py <opml file> <html file>', file = sys.stderr) | |
sys.exit(2) |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |