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
require "bundler/capistrano" | |
set :application, "your_app" | |
# multistage | |
set :stages, ["staging", "production"] | |
set :default_stage, "staging" | |
require "capistrano/ext/multistage" |
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
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer |
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
# from http://stackoverflow.com/questions/314675/how-do-i-redirect-the-output-of-an-entire-shell-script-within-the-script-itself | |
# save stdout and stderr to file descriptors 3 and 4, then redirect them to "foo" | |
exec 3>&1 4>&2 >foo 2>&1 | |
# ... | |
# restore stdout and stderr | |
exec 1>&3 2>&4 |
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
openssl genrsa -des3 -out server.key 1024 | |
openssl req -new -key server.key -out server.csr | |
cp server.key server.key.org | |
openssl rsa -in server.key.org -out server.key | |
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt | |
sudo cp server.crt /opt/local/apache2/conf/server.crt | |
sudo cp server.key /opt/local/apache2/conf/server.key |
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
defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder |
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/sh | |
# | |
# Script to create an empty Git-Repository. | |
# | |
GIT_BASEPATH=/var/cache/git | |
SCRIPT_NAME="`basename $0`" | |
PROJECT_NAME="$1" | |
if [ -z "$PROJECT_NAME" ]; then | |
echo "Usage: $SCRIPT_NAME PROJECT_NAME" |
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/sh | |
NEWUSER="$1" | |
PASSWORD="$2" | |
if [ -z "$NEWUSER" ]; then | |
echo "Usage: addmysqluser USERNAME [PASSWORD]" | |
exit 0 | |
fi |
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/sh | |
DB="$1" | |
if [ -z "$DB" ]; then | |
echo "Usage: addmysqldb DB" | |
exit 0 | |
fi | |
RESULT=$(echo "CREATE DATABASE \`$DB\` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;" |mysql5 mysql 2>&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
RED="\033[0;31m" | |
LRED="\033[1;31m" | |
GREEN="\033[0;32m" | |
LGREEN="\033[1;32m" | |
BROWN="\033[0;33m" | |
YELLOW="\033[1;33m" | |
BLUE="\033[0;34m" | |
LBLUE="\033[1;34m" | |
PURPLE="\033[0;35m" | |
LPURPLE="\033[1;35m" |
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/sh | |
# | |
# Changes the document root of a Apache 2 virtual host. | |
# | |
# Assumes /opt/local/www as base directory for virtual hosts. | |
# | |
# Usage: wwwhome [--host HOSTNAME] [PATH] | |
# | |
# Examples: | |
# |
NewerOlder