Tools and tips that make my day better.
export TERM=xterm
apt-get update -yq && apt-get install -yq mc vim htop
echo "{"; for ($i = 0; $i < strlen($x); $i++) { echo dechex(ord($x[$i])), ", "; } echo "}"; |
#!/bin/bash | |
# Safest push default behaviour | |
git config --global push.default simple | |
# Reseting permissions (file mode) http://stackoverflow.com/a/4408378/1765978 | |
git config --global --add alias.permission-reset '!git diff -p -R | grep -E "^(diff|(old|new) mode)" | git apply' | |
git permission-reset | |
# Global .gitignore file in home directory | |
git config --global core.excludesfile '~/.gitignore' |
cd /usr/share/ca-certificates | |
mkdir gandi.net | |
cd gandi.net | |
wget http://crt.gandi.net/GandiStandardSSLCA.crt | |
openssl x509 -inform der -outform pem < /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.crt > GandiStandardSSLCA.pem | |
ln -s /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.pem /etc/ssl/certs/GandiStandardSSLCA.pem | |
/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 6697 |
# simple file for app deployment to single node | |
# host and namespace can be overriden by CLI parameters | |
# - it can be used to spread setup accross multiple servers that can't be in fleet. | |
host: # globally | |
namespace: customer01 | |
enable: | |
- redis | |
services: | |
#!/bin/bash | |
ROOT=$(pwd) | |
USER=nette | |
WEB_SERVER_GROUP=www-data | |
# create cache | |
if [ ! -d "$ROOT/temp/cache" ]; then | |
mkdir -p "$ROOT/temp/cache" | |
fi | |
# journal |
<?php | |
namespace Kdyby\Doctrine\Console; | |
use Kdyby; | |
use Kdyby\Doctrine\BatchImportException; | |
use Kdyby\Doctrine\Helpers; | |
use Rixxi; | |
use Symfony; |
#!/bin/bash | |
echo "Deploy launched." | |
# fetch new version | |
git fetch origin | |
# check for changes | |
CHANGES=$(git status -s) |
<?php | |
namespace App; | |
use Nette; | |
class ProviderCollector extends Nette\Object | |
{ |