A Pen by jeevan dongre on CodePen.
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
LOAD DATA LOCAL INFILE 'file_name.csv' | |
INTO TABLE table_name | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' | |
IGNORE 1 ROWS; |
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
deploy_revision("new-spree-st") do | |
action [:deploy] | |
updated true | |
updated_by_last_action true | |
retries 0 | |
default_guard_interpreter :default | |
deploy_to "/home/vagrant/apps/new-spree-st" | |
environment {"RAILS_ENV"=>"production"} | |
repository_cache "cached-copy" | |
symlink_before_migrate {"database.yml"=>"config/database.yml"} |
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 -e | |
apt-get -y install build-essential zlib1g-dev libreadline-dev libssl-dev g++ bundler curl git htop nginx mysql-client libcurl3 libcurl3-gnutls libcurl4-openssl-dev liblzma-dev zlib1g-dev libmysqlclient-dev | |
sudo -u vagrant wget 'http://s3-ap-southeast-1.amazonaws.com/st-back-up/ruby-2.0.0-p247.tar.gz' | |
echo "Downloading ruby from s3..... \n Please wait ......" | |
sudo -u vagrant /bin/tar -zxvf ruby-2.0.0-p247.tar.gz | |
sudo chown vagrant:vagrant -R ruby-2.0.0-p247/ | |
cd ruby-2.0.0-p247 | |
sudo -u vagrant ./configure | |
sudo -u vagrant make |
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 | |
sudo apt-get update --fix-missing | |
sudo apt-get upgrade openssl | |
openssl version -a | |
sudo apt-get update && sudo apt-get upgrade openssl && openssl version -b |
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
worker_processes 2; | |
user ubuntu ubuntu; # for systems with "nobody" as a group instead | |
# Feel free to change all paths to suite your needs here, of course | |
pid /etc/nginx/nginx.pid; | |
error_log /var/log/nginx/nginx.error.log; | |
events { | |
worker_connections 1024; # increase if you have lots of clients |
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/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Manage unicorn server | |
# Description: Start, stop, restart unicorn server for a specific application. | |
### END INIT INFO |
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/sh | |
PATH=/home/ubuntu/.rvm/gems/ree-1.8.7-2012.02/bin:/home/ubuntu/.rvm/gems/ree-1.8.7-2012.02@global/bin:/home/ubuntu/.rvm/rubies/ree-1.8.7-2012.02/bin:/home/ubuntu/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
DAEMON=/home/ubuntu/.rvm/gems/ree-1.8.7-2012.02/bin/unicorn_rails | |
GEM_HOME=/home/ubuntu/.rvm/gems/ree-1.8.7-2012.02 | |
GEM_PATH=ome/ubuntu/.rvm/gems/ree-1.8.7-2012.02:/home/ubuntu/.rvm/gems/ree-1.8.7-2012.02@global | |
DAEMON_OPTS="-D -c /path/to/app/config/unicorn.rb" | |
NAME=unicorn_rails |