Skip to content

Instantly share code, notes, and snippets.

// imho, a shorter method of escaping should co-exist with the short open tags, since most "echoed" stuff ends up being served as html
<?: "<script>" ?>
//should become
&lt;script&gt;
@chelmertz
chelmertz / export.php
Created August 30, 2011 19:11
wordpress to jekyll export
<?php
// The following is modified from https://raw.github.com/tylerhall/clickontyler.com/master/_scripts/import.php by Tyler Hall
// This is the script I used to export my old blog out of WordPress and into a
// Jekyll friendly format. The first half exports posts, the second does pages.
// It's fairly specific to my needs, but maybe it'll be a good starting point
// for you. /RTH 2011-08-28
// https://twitter.com/#!/marcoarment/status/59089853433921537
set @post_id = 587;
select t.term_id, t.name, t.slug
from terms as t
inner join term_taxonomy as tt
on tt.term_id = t.term_id
and taxonomy = 'post_tag'
where tt.term_id in (
select term_taxonomy_id from term_relationships where object_id = @post_id
)
@chelmertz
chelmertz / Makefile
Created October 8, 2011 22:20
Makefile for c studies
compile = gcc -Wall -c
ignored = *.zip *.pdf *.out *.swp .DS_Store *.o
init:
touch notes.md
for ignored in $(ignored) ; do \
echo $$ignored >> .gitignore ; \
done
default: clean
@chelmertz
chelmertz / google.xml
Created October 19, 2011 11:14
Webinject testcase
<testcases repeat="1">
<testvar varname="SEARCH_TERM">Wolksvagen</testvar>
<case
id="1"
description1="Find information about ${SEARCH_TERM}"
method="get"
verifyresponsecode="200"
url="http://www.google.se/m?dc=gorganic&source=mobileproducts&q=${SEARCH_TERM}"

Keybase proof

I hereby claim:

To claim this, I am signing this object: