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
// inspiration | |
// http://timnew.me/blog/2013/01/30/pitfall-in-node-crypto-and-base64-encoding/ | |
// https://github.com/kevva/base64-regex | |
Base64Util = { | |
encode64: function(text) { | |
return new Buffer(text, 'utf8').toString('base64'); | |
}, | |
decode64: function(base64) { | |
return new Buffer(base64, 'base64').toString('utf8'); | |
}, |
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
# https://wiki.ubuntu.com/ReducingDiskFootprint#Documentation | |
sudo bash | |
# Purge documentations | |
# http://askubuntu.com/questions/129566/remove-documentation-to-save-hard-drive-space | |
find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true | |
find /usr/share/doc -empty|xargs rmdir || true | |
rm -rf /usr/share/man/* /usr/share/groff/* /usr/share/info/* | |
rm -rf /usr/share/lintian/* /usr/share/linda/* /var/cache/man/* |
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
mkdir wordpress | |
cd wordpress | |
wp core download | |
wp core config --dbname=<database name> --dbuser=<database username> --dbpass=<database password> | |
wp db create | |
wp core install --url=<url> --title=<title> --admin_user=<admin_user> --admin_password=<admin_pw> --admin_email=<admin_email> | |
wp uninstall akismet | |
wp uninstall hello |
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
# locale | |
sudo locale-gen da_DK.UTF-8 | |
sudo apt-get -y update | |
sudo apt-get -y install php5-intl | |
sudo apt-get -y install php5-curl | |
kpm install composer | |
kpm install kdbin | |
kpm install grunt | |
kpm install pip |
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
git remote add upstream https://github.com/<maintainer>/<repo>.git | |
git fetch upstream | |
git checkout master | |
git merge upstream/master |
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
find /path/to/base/dir -type d -exec chmod 755 {} + | |
To recursively give files read privileges: | |
find /path/to/base/dir -type f -exec chmod 644 {} + | |
Or, if there are many objects to process: | |
chmod 755 $(find /path/to/base/dir -type d) | |
chmod 644 $(find /path/to/base/dir -type f) | |
Or, to reduce chmod spawning: |
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
find . -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; 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
page.includeCSS { | |
font-awesome = //maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css | |
font-awesome.external = 1 | |
} |
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 -eux | |
# Get an admin login link | |
drush uli | |
# Set the password for any user | |
drush upwd admin --password="newpassword" |
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
*.cookie | |
*.zip |