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
SELECT schemaname, pg_size_pretty(t.taille::bigint) AS taille_table,pg_size_pretty(t.taille_index::bigint) AS taille_index, pg_size_pretty(t.taille_totale::bigint) AS taille_totale_table | |
FROM (SELECT schemaname, | |
sum(pg_relation_size(schemaname || '.' || tablename)) AS taille, | |
sum(pg_indexes_size(schemaname || '.' || tablename)) AS taille_index, | |
sum(pg_total_relation_size(schemaname || '.' || tablename)) AS taille_totale | |
FROM pg_tables | |
WHERE schemaname != 'my_schema' | |
GROUP BY schemaname) as t ORDER BY taille_totale DESC |
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
^(?=.*contains.*)(?!.*notcontains).* |
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
wget -r --no-parent --user=user --password=pass --reject "index.html*" http://mysite.com/uploads/ |
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
rsync -avz -e ssh /var/lib/jenkins root@myhost:/var/lib/jenkins.prod |
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
cd /tmp | |
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm | |
yum -y --enablerepo=remi-php56 --enablerepo=remi update php libicu-last php-intl |
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
find /home/bruno/old-friends -type f -exec sed -i 's/ugly/beautiful/g' {} \; |
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
# installation centos | |
http://www.liquidweb.com/kb/how-to-install-docker-on-centos-6/ | |
# registry docker | |
git clone https://github.com/dotcloud/docker-registry.git | |
cd docker-registry | |
cp config_sample.yml config.yml | |
pip install -r requirements.txt |
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
git filter-branch --tree-filter 'rm -rf tests/' --tag-name-filter cat --prune-empty -- --all | |
git push -f | |
git push -f --tags |
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
yum clean all | |
[ -f /root/.bash_history ] && rm -f /root/.bash_history | |
find /var/log -type f -name "*.log" | while read f; do echo -ne '' > $f; done; | |
dd if=/dev/zero of=/EMPTY bs=1M | |
rm -f /EMPTY | |
count=`df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}'`; |
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 | |
SRC_REPO=[URL SRC] | |
SRC_DIR=tests | |
OUTPUT_REPO=[URL DEST] | |
TMP_DIR=$(mktemp -d) | |
git clone $SRC_REPO $TMP_DIR; | |
git filter-branch --prune-empty --subdirectory-filter $SRC_DIR master |