Skip to content

Instantly share code, notes, and snippets.

Annika Backstrom abackstrom

Block or report user

Report or block abackstrom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


function the_thing() {
    echo "haha CODE";


abackstrom /
Last active Dec 23, 2015
Sample Python server to return formatted data for GeekTool.
#!/usr/bin/env python
# Run this in the background. Poll using netcat:
# $ nc localhost 5005
# Made for use with GeekTool.
abackstrom /
Last active Dec 21, 2015
Series of scripts to send syntax-highlighted email from the command line. Sample usage: git diff | highlight | vipe | pmail -t -s "Code Review"
if [ -n "$1" ] ; then
pygmentize -O full -f html "$@"
pygmentize -O full -f html -g
abackstrom / gist:6106159
Last active Dec 20, 2015
Weechat configuration to customize the hotlist. Cycle through buffers with alt-a. See Notify Levels:
View gist:6106159
/set weechat.look.buffer_notify_default highlight
/set weechat.notify.irc.freenode.#wordpress all
/set weechat.notify.irc.freenode.#pelican all
abackstrom / gist:5799310
Created Jun 17, 2013
Enable GitHub "Repository Next"
View gist:5799310
$('<a href="/users/' + $("#js-command-bar-field").data('username') + '/enable_repository_next" class="button minibutton flash-action blue" data-method="post">Enable Repository Next</a>').appendTo(document.body).click()
abackstrom / gist:5526832
Last active Dec 17, 2015
Lua-driven nginx config to make my website's SSL redirect work with domain validation. does not follow redirects during the validation process. This config ensures the validator gets a response code and body it understands.
View gist:5526832
# http->https redirect
server {
include logging.conf;
access_log /var/www/ custom;
error_log /var/www/ error;
location / {
View arbitrary-siteurl.diff
Index: domain_mapping.php
--- domain_mapping.php (revision 9545)
+++ domain_mapping.php (revision 9553)
@@ -515,27 +515,37 @@
-function domain_mapping_siteurl( $setting ) {
- global $wpdb, $current_blog;
+function domain_mapping_siteurl( $setting, $blog_id = 0 ) {
abackstrom / gist:4611843
Last active Dec 11, 2015
post-commit hook for @mikesusz
View gist:4611843
# curl > .git/hooks/post-commit && chmod +x .git/hooks/post-commit
git diff-tree -p HEAD^ | grep livereload 2>&1 >/dev/null
if [ $? -eq 0 ] ; then
echo -e "\e[0;31m!!! Don't commit livereload stuff. --amend that commit.\e[0m"
View gist:4353734
/* style to hide private bookmarks, except on hover */
.bookmark.private {
opacity: 0;
.bookmark.private:hover {
opacity: 1;
View gist:4331659
// The following code exists in the public domain. No warranty is expressed or implied.
* Return the priority of the currently-running filter.
function current_filter_priority() {
You can’t perform that action at this time.