Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
usage() | |
{ | |
echo "./$0 [--verbose]" | |
} | |
VERBOSE=0 | |
if [ "$1" == "--verbose" ]; then | |
VERBOSE=1 | |
fi |
# sets the proxy cache path location, max size 2g | |
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g; | |
# transfers the `Host` header to the backend | |
proxy_set_header Host $host; | |
# uses the defined STATIC cache zone | |
proxy_cache STATIC; | |
# cache 200 10 minutes, 404 1 minute, others status codes not cached |
Getting started:
Related tutorials:
#!/bin/bash | |
# Install a custom version 2 of PhantomJS, http://phantomjs.org/ | |
# | |
# Include in your builds via | |
# \curl -sSL https://gist.githubusercontent.com/mlocher/f0f731dfa93c82d0fa86/raw/phantomjs2.sh | bash -s | |
PHANTOMJS_URL="https://s3.amazonaws.com/codeship.io/checkbot/binaries/phantomjs_2.0.1" | |
CACHED_DOWNLOAD="${HOME}/cache/phantomjs_2.0.1" | |
# official packages are now available, thus print an info message | |
echo -e "\e[36mOfficial PhantomJS 2 packages are now available from phantomjs.org\e[39m" |
#!/bin/bash | |
# Install a custom version of PhantomJS, http://phantomjs.org/ | |
# | |
# If you run into any rate limiting issues from bitbucket, put the download | |
# file(s) into your own server and point to the location via the PHANTOMJS_HOST | |
# environment variable. | |
# | |
# Add at least the following environment variables to your project configuration | |
# (otherwise the defaults below will be used). | |
# * PHANTOMJS_VERSION - Specify the version of PhantomJS |
echo "Updates packages. Asks for your password." | |
sudo apt-get update -y | |
echo "Installs packages. Give your password when asked." | |
sudo apt-get install -y curl nodejs libcurl4-gnutls-dev git-core libxslt1-dev libxml2-dev libsqlite3-dev libgmp-dev libmysqlclient-dev git git-doc libncurses5-dev build-essential rake libqt4-dev libqtwebkit-dev openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config libv8-dev libmagickwand-dev libreadline-dev libedit-dev libgdbm-dev libffi-dev zlib1g-dev rake curl vim libgmp3-dev phantomjs imagemagick | |
echo "Setting up mysql" | |
sudo apt-get install -y mysql-server mysql-client | |
echo "Setting up postgres" |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
echo "Installing NodeJS 6.x" | |
sudo apt-get install nodejs | |
echo "Install webpack globally" | |
sudo npm install webpack -g | |
echo "Install nightwatch globally" | |
sudo npm install nightwatch -g |
echo "Installing sublime" | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
sudo apt-get update | |
sudo apt-get install sublime-text | |
echo "Installing Atom" | |
sudo add-apt-repository ppa:webupd8team/atom | |
sudo apt-get update | |
sudo apt-get install atom |
sudo -i | |
cd | |
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y | |
wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xzvf ImageMagick.tar.gz | |
cd ImageMagick-7.0.6-0/ | |
./configure --prefix=/opt/imagemagick-7.0 && make | |
checkinstall |
module Rack | |
# disable CSS3 and jQuery animations in test mode for speed, consistency and avoiding timing issues. | |
# Usage for Rails: | |
# in config/environments/test.rb | |
# config.middleware.use Rack::NoAnimations | |
class NoAnimations | |
def initialize(app, options = {}) | |
@app = app | |
end |