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 mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.old | |
xcode-select --install | |
sudo rm -rf /Library/Developer/CommandLineTools.old | |
brew uninstall cctools | |
rvm get stable; rvm reload; rvm install "ruby-2.5.3" |
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 | |
# Quick and dirty WEBM to MP4 converter | |
# by Grzegorz Błaszczyk <[email protected]> 2017 | |
# License: MIT http://rem.mit-license.org/ | |
FFMPEG=`which ffmpeg` | |
LAME=`which lame` | |
RM=`which rm` |
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 | |
AWK=`which awk` | |
FIND=`which find` | |
GREP=`which grep` | |
LS=`which ls` | |
echo "Getting the log files..." | |
FILES=`${FIND} . -name "*.log" | ${GREP} "/log/"` |
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 | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
sudo apt-get install nodejs | |
sudo apt-get install build-essential | |
gem install therubyracer |
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
ALTER DATABASE [database_name] CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
ALTER TABLE [table_name] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
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
CREATE DATABASE [database] DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; | |
CREATE USER [user] IDENTIFIED BY '[pass]'; | |
CREATE USER [user]@'localhost' IDENTIFIED BY '[pass]'; | |
GRANT ALL PRIVILEGES ON [database].* TO [user]; | |
GRANT ALL PRIVILEGES ON [database].* TO '[user]'@'localhost'; |
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 | |
USERNAME=$1 | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable | |
source /home/$USERNAME/.rvm/scripts/rvm | |
rvm install ruby-2.0.0-p353 | |
cd /home/$USERNAME/ | |
gem install passenger |
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 | |
# Do it as root | |
apt-get update | |
apt-get install -y vim mc curl libcurl4-openssl-dev git libmysqlclient-dev mysql-client patch gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev | |
USERNAME=$1 | |
useradd -d /home/$USERNAME -m $USERNAME |
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 | |
TAIL=`which tail` | |
APP="app" | |
NGINX_ACCESS_LOG_FILE="/opt/nginx-${APP}/logs/access.log" | |
NGINX_ERROR_LOG_FILE="/opt/nginx-${APP}/logs/error.log" | |
RAILS_LOG="${HOME}/current/log/staging.log" | |
$TAIL -f $NGINX_ACCESS_LOG_FILE $NGINX_ERROR_LOG_FILE $RAILS_LOG |
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 | |
CREATE_USER="$1" | |
# Do it as root | |
apt-get update | |
apt-get install -y vim mc curl libcurl4-openssl-dev git libmysqlclient-dev mysql-client patch gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev | |
useradd -d /home/${CREATE_USER} -m ${CREATE_USER} |
NewerOlder