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 | |
set -euo pipefail | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# Thanks: | |
# * https://github.com/alestic/alestic-git/blob/master/bin/alestic-git-build-ami for the overall approach and ec2 commands | |
# * https://github.com/kickstarter/build-ubuntu-ami/blob/master/data/user_data.sh.erb for the user script run in chroot | |
# * https://blog.tinned-software.net/mount-raw-image-of-entire-disc/ for how to mount the raw image with losetup | |
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 | |
function ltsv_decode($data){ | |
// From parse_field (https://github.com/solidsnack/tsv/blob/master/tsv.py#L90) | |
$stack = []; | |
$replaces = ['t' => "\t", 'n' => "\n", 'r' => "\r", '\\' => "\\"]; | |
$tmp = explode("\\", $data, 2); | |
while (count($tmp) >= 2){ | |
$stack[] = $tmp[0]; |
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 | |
# The standard, global, Gitlab update hook | |
update_true_path="$(cd `dirname $(readlink $0)` && pwd)" | |
update_gitlab="$update_true_path/update" | |
# Additional, local, update.before and update.after hooks | |
hooks_dir="$(cd `dirname $0` && pwd)" | |
update_before="$hooks_dir/update.before" | |
update_after="$hooks_dir/update.after" |