This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Script to Make Afvalophalingskalender Great Again for Ivago (the municipal | |
* waste management company for Ghent, Belgium): | |
* - make events last all day (so they appear on top of the calendar on | |
* Google Calendar, for instance) | |
* - do not use ALL CAPS for event summaries | |
* | |
* 1. Go to https://www.ivago.be/nl/particulier/afval/ophaling | |
* 2. Download the ICS for your street. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A wrapper for "ssh" to avoid having multiple keys sent. Leave the | |
# IdentityFile options out of your host sections in ~/.ssh/config. This | |
# function adds them based on the arguments. | |
function ssh { | |
local new_args=(); | |
local arg; | |
for arg; do | |
if [ "$arg" = 'purplepixelhost' ]; then | |
new_args+=(-i ~/.ssh/purplepixelhost.id_rsa); | |
elif [ "$arg" = 'qiwib0xorz' ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
// Use this on http://www.camper.com/en_BE/men/shoes/shoe to change the | |
// thumbnails to the top-down view. Useful for people with wide feet. | |
var images = document.querySelectorAll('img[src*="JGVzaG9wNiQ="]'); | |
Array.prototype.slice.call(images).forEach(function (img) { | |
img.src = img.src.replace('_L.jpg', '_C.jpg'); | |
}); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stack=(''); | |
for i in {1..10}; do | |
printf -v alias_name '.%s' "${stack[@]}"; | |
printf -v path '../%s' "${stack[@]}"; | |
alias ".$alias_name"="cd $path"; | |
stack+=(''); | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function manneke { | |
:;:;:;:;:;:;: | |
:;:;:;:;:;:;: | |
<. :;:;:;:;:;:;:;:;: | |
[ ! ] ; [ ! ] | |
: : | |
: _ : | |
[ \_____/ ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Search Google Maps for a bicycle route. | |
* | |
* @title Google Maps (for cyclists) | |
*/ | |
(function ride() { | |
/* Try to get the parameter string from the bookmarklet/search query. */ | |
/* Fall back to the current text selection, if any. If those options | |
/* both fail, prompt the user. */ | |
var s = (function () { /*%s*/ }).toString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the output of var_dump() for better legibility. | |
* | |
* @param mixed $arg1..N | |
*/ | |
function getVarDump() { | |
$output = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function log { | |
echo "$@" 1>&2; | |
} | |
for page_url; do | |
log "Now processing page: $page_url"; | |
# Assemble the playlist URL. It is stored in two JavaScript properties in | |
# the HTML page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == WHAT | |
# Expand the tweets mentioned in a channel, as well as the tweets those tweets refer to. | |
# | |
# == WHO | |
# Jan Moesen, 2012 | |
# | |
# == INSTALL | |
# Place these files in `~/.irssi/scripts/`. | |
# /script load twatspam.pl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make a temporary directory for our little test. | |
mkdir linkage.tmp || exit $?; | |
cd linkage.tmp; | |
# Create two directories and a symlink to the first. | |
rm -rvf v1 v2 current; | |
mkdir v1 v2; | |
ln -s v1 current; |
NewerOlder