Skip to content

Instantly share code, notes, and snippets.

View regex.py
"""
PRE-PROCESSORS
=============================================================================
Preprocessors work on source text before we start doing anything too
complicated.
"""
import re
import util
@jakesyl
jakesyl / keepgoing.php
Last active Aug 29, 2015
Execute PHP after sending back the page
View keepgoing.php
<?php
ob_end_clean();
header("Connection: close");
ignore_user_abort(true); // optional
ob_start();
echo ('Text the user will see');
$size = ob_get_length();
header("Content-Length: $size");
ob_end_flush(); // Strange behaviour, will not work
flush(); // Unless both are called !
View pay.js
(function() {
window.onload = function() {
var a = window.location.hash.substring(1);
10 < a.length && d("affiliate", a, 2);
e("copy-link-button1");
e("copy-link-button2");
document.getElementById("modal-close").onclick = function(a) {
a.preventDefault();
document.getElementById("share-modal").style.display = "none"
};
View gist:6f77e3c836b1844fbaa3
<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<rank>1</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
@jakesyl
jakesyl / yum.sh
Created Jul 10, 2015
Installing Node on AMI
View yum.sh
sudo yum install nodejs npm --enablerepo=epel