Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
if [ "`whoami`" != "root" ]; then
echo "You must execute this script as root" >&2
exit 1
fi
if [ "$1" == "" ]; then
echo "Syntax: $0 USER DIRECTORY" >&2
exit 1
#!/usr/bin/env bash
if [ "`whoami`" != "root" ]; then
echo "You must execute this script as root" >&2
exit 1
fi
VERSION=1.5.1
echo ".-----------------------------."
#!/usr/bin/env bash
if [ "$1" == "" ]; then
echo "Syntax: $0 TAG" >&2
fi
git tag -d $1
git push origin :refs/tags/$1
git push --tags
@amercier
amercier / git-migrate.sh
Last active August 29, 2015 13:58
bash <(curl -# -L https://gist.github.com/amercier/10246387/raw) <old url> <new url>
#!/usr/bin/env bash
if [ "$1" == "" ] || [ "$2" == "" ]; then
echo "Syntax: $0 <old url> <new url>" 2>&1
exit 1
fi
echo "$1 => $2"
echo "Looking for .git/config files in $(readlink -f .)..."
#!/usr/bin/env bash
git pull
git push --tags
git tag | egrep '^[0-9]+(\.[0-9]+)*$' | while read tag; do
echo "========== $tag => v$tag ==========";
git tag v$tag $tag
git tag -d $tag
git push origin :refs/tags/$tag
git push --tags
#!/bin/zsh
palette="#494948483E3E:#F9F926267272:#A6A6E2E22E2E:#FDFD97971F1F:#6666D9D9EFEF:#AEAE8181FFFF:#A1A1EFEFE4E4:#F8F8F8F8F2F2:#757571715E5E:#FCFC5C5C9494:#C1C1F1F16161:#FEFEB2B25757:#8D8DE6E6F7F7:#C2C2A1A1FFFF:#BBBBF7F7EFEF:#F8F8F8F8F0F0"
bd_color="#F8F8F8F8F2F2"
fg_color="#F8F8F8F8F2F2"
bg_color="#272728282222"
gsettings set org.mate.terminal.profile:/org/mate/terminal/profiles/default/ background-color $bg_color
gsettings set org.mate.terminal.profile:/org/mate/terminal/profiles/default/ foreground-color $fg_color
gsettings set org.mate.terminal.profile:/org/mate/terminal/profiles/default/ bold-color $bd_color
#!/usr/bin/env bash
if [ "`whoami`" != "root" ]; then
echo "You must execute this script as root" >&2
exit 1
fi
echo ".---------------------."
echo "| GitLab installation |"
echo "'---------------------'"
#!/usr/bin/env bash
if [ "`whoami`" != "root" ]; then
echo "You must execute this script as root" >&2
exit 1
fi
echo ".---------------------------."
echo "| VMware tools installation |"
echo "'---------------------------'"
#!/usr/bin/env bash
if [ "`whoami`" != "root" ]; then
echo "You must execute this script as root" >&2
exit 1
fi
echo ".----------------------."
echo "| node.js installation |"
echo "'----------------------'"
#!/usr/bin/env bash
if [ "`whoami`" != "root" ]; then
echo "You must execute this script as root" >&2
exit 1
fi
VERSION=2.1.1
URL=ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-$VERSION.tar.gz