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
echo template shell = /bin/zsh | sudo tee /etc/samba/smb.conf.local; sudo service winbind restart |
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
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "" | |
}, | |
"builders": [{ | |
"type": "amazon-instance", | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"account_id": "<<YOUR_ACCOUNT_ID>>", |
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 f in *; do | |
if [ -d "$f" ]; then | |
hg pull -u -R "$f" | |
fi | |
done |
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
# Check java version | |
JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') | |
if [ "$JAVA_VER" -lt 18 ] | |
then | |
# Figure out how many versions of Java and javac we currently have | |
NR_OF_JRE_OPTIONS=$(echo 0 | alternatives --config java 2>/dev/null | grep 'There ' | awk '{print $3}' | tail -1) | |
NR_OF_SDK_OPTIONS=$(echo 0 | alternatives --config javac 2>/dev/null | grep 'There ' | awk '{print $3}' | tail -1) | |
# Silent install javac (includes jre) |
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
SELECT schema_name, | |
pg_size_pretty(sum(table_size)::bigint), | |
sum(table_size)::bigint, | |
(sum(table_size) / pg_database_size(current_database())) * 100 | |
FROM ( | |
SELECT pg_catalog.pg_namespace.nspname as schema_name, | |
pg_relation_size(pg_catalog.pg_class.oid) as table_size | |
FROM pg_catalog.pg_class | |
JOIN pg_catalog.pg_namespace ON relnamespace = pg_catalog.pg_namespace.oid | |
) t |
NewerOlder