This file contains 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 -e | |
usage() { | |
echo "Need a hosted zone name (abc.com.) with the dot on the end" | |
exit 1 | |
} | |
HOSTED_ZONE_NAME=$1 | |
if [[ "$HOSTED_ZONE_NAME" == "" ]] ; then | |
usage |
This file contains 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
/* | |
Copyright 2015 Seb Maynard | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains 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 man is not dead while his name is still spoken. | |
-module(clacks_middleware). | |
-behaviour(cowboy_middleware). | |
-export([execute/2]). | |
execute(Req, Env) -> | |
ReqWithClacks = cowboy_req:set_resp_header(<<"x-clacks-overhead">>, <<"GNU Terry Pratchett">>, Req), | |
{ok, ReqWithClacks, Env}. |
This file contains 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 | |
# speed things up quite a lot! | |
export LC_ALL=C | |
# uses -P (perl regular expressions) for speed | |
find ./ -type f ! \ | |
-path "*/deps/*" ! \ | |
-path "*/caerldeps/*" ! \ | |
-path "*/_rel/*" ! \ |
This file contains 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
set-window-option -g xterm-keys on |
This file contains 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
# update dilbert rss every morning at 2am | |
0 2 * * * /home/user/bin/update_dilbert.sh |
This file contains 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 | |
## for emacsclient: | |
## -c is gui window | |
## -n is no-wait - don't wait for the window to close | |
## sed buffers by default | |
## -u is unbuffered | |
## zenity expects text progress to start with # | |
emacsclient -c -n 2>&1 | sed -u -e 's/^/# /g' | zenity --title="Starting EmacsClient" --width=600 --progress --pulsate --auto-close |
This file contains 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 | |
# Upgrade an owncloud instance. Makes the following assumptions: | |
# 1. you're running this as the same user who owns (and can write to) $OWNCLOUD_FOLDER | |
# 2. $TMP_FOLDER is writeable by this user | |
# These should be absolute paths | |
OWNCLOUD_FOLDER=/var/public_html_ssl/cloud | |
TMP_FOLDER=/tmp/owncloud-upgrade |
This file contains 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 link_files_to_folder() { | |
if [[ ! -d $1 || ! -d $2 ]] ; then | |
echo "Usage: link_files_to_folder <source_dir> <target_dir> [prefix]" | |
exit | |
fi | |
SOURCE_DIR=$1 | |
TARGET_DIR=$2 |
This file contains 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
-module(ca_cowboy_middleware). | |
-behaviour(cowboy_middleware). | |
-export([execute/2]). | |
execute(Req, Env) -> | |
{ok, ReqWithCorsHeaders} = set_cors_headers(Req), | |
{Method, ReqMethod} = cowboy_req:method(ReqWithCorsHeaders), |
NewerOlder