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
# 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 | |
echo "Setting up mysql" | |
sudo apt-get install -y mysql-server mysql-client | |
echo "Setting up postgres" |
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 |
module PagesHelper | |
# Marker '#c' implies that character set has been updated on certain countries | |
def country_code | |
[["AFG", "Afghanistan"], | |
["ALB", "Albania"], | |
["DZA","Algeria"], | |
["ASM","American Samoa"], | |
["AND","Andorra"], | |
["AGO","Angola"], | |
["AIA","Anguilla"], |
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" |
#!/bin/bash | |
# cleanup_gitlab_builds: to remove old gitlab builds | |
WORK_DIR=/home/gitlab-runner/builds | |
LAST_MODIFY_DAYS=30 # no of days the directory was modified | |
dir_array=() | |
space_cleared=0 | |
skipped_dirs=() | |
QUIET=1 |