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 | |
sudo add-apt-repository -y ppa:yannubuntu/boot-repair && sudo apt-get update | |
sudo apt-get install -y boot-repair && boot-repair |
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(camisc_unique). | |
-export([semi_unique/0, get_timestamp/0, test/0]). | |
%% =================================================================== | |
%% API | |
%% =================================================================== | |
%% Generate a somewhat unique 64 bit number. | |
%% |
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(module_starter_hack). | |
-export([try_force_start_application/1]). | |
try_force_start_application(App) -> | |
start_application_process_result(App, try_start_application(App)). | |
%%%%%%%%%%%%%%% | |
%% Helpers |
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), |
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
#!/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 | |
## 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
# 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
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
#!/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/*" ! \ |
OlderNewer