As configured in my dotfiles.
start new:
tmux
start new with session name:
| # Install Bash 4 using homebrew | |
| brew install bash | |
| # Or build it from source... | |
| curl -O http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz | |
| tar xzf bash-4.2.tar.gz | |
| cd bash-4.2 | |
| ./configure --prefix=/usr/local/bin && make && sudo make install | |
| # Add the new shell to the list of legit shells |
As configured in my dotfiles.
start new:
tmux
start new with session name:
see http://doc.freenas.org/index.php/Plugins get pluginjail running
create a folder / zfs filesystem on a device with sufficient storage space.
mount_nullfs created directory to /plugin-jail-path/usr/ports
portsnap fetch
portsnap extract
| class TrueClass | |
| def to_s(style = :boolean) | |
| case style | |
| when :word then 'yes' | |
| when :Word then 'Yes' | |
| when :number then '1' | |
| else 'true' | |
| end | |
| end | |
| end |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| echo '# rbenv setup' > /etc/profile.d/rbenv.sh | |
| echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh | |
| echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
| echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
| chmod +x /etc/profile.d/rbenv.sh | |
| source /etc/profile.d/rbenv.sh | |
| git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
| rbenv install 1.9.3-p392 |
| #!/bin/bash | |
| NAME="hello_app" # Name of the application | |
| DJANGODIR=/webapps/hello_django/hello # Django project directory | |
| SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
| USER=hello # the user to run as | |
| GROUP=webapps # the group to run as | |
| NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
| DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
| DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
| require 'mina/git' | |
| require 'mina/rbenv' | |
| require 'mina-contrib/rbenv' | |
| require 'mina-contrib/config' | |
| require 'mina-contrib/bundler' | |
| require 'mina-contrib/safety-check' | |
| require 'mina-contrib/nginx' | |
| require 'mina-contrib/puma' | |
| set :term_mode, :pretty |
Without wasting much time, Let us get started!
Follow these simple instructions:
Step 1: Login into your WHM panel and using easyapache enable Memcache
Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| ############################################################ | |
| # Dockerfile to build web host container images | |
| # Based on Ubuntu, Django, uwsgi, and Nginx | |
| ############################################################ | |
| # Set the base image to Ubuntu | |
| FROM ubuntu:14.04 | |
| # File Author / Maintainer | |
| MAINTAINER TK - simpleloop |