Skip to content

Instantly share code, notes, and snippets.

View smahi's full-sized avatar

Abesse Smahi smahi

  • Tamanrasset / Algeria
View GitHub Profile
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
@smahi
smahi / .gemrc
Created May 29, 2014 09:38 — forked from jch/.gemrc
# http://docs.rubygems.org/read/chapter/11
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://gems.rubyforge.org/
- http://rubygems.org/
backtrace: true
# Install rvm system-wide
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
# Update the packages
apt-get update
apt-get upgrade
apt-get install build-essential
# get the packages required by ruby
rvm pkg install zlib

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential libyaml-dev zlib1g-dev openssl libssl-dev libreadline-gplv2-dev aria2
cd /tmp
aria2c -c -j1 -x16 -s16 ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
tar -xvzf ruby-2.1.1.tar.gz
cd ruby-2.1.1
sudo ./configure --prefix=/usr/local
sudo make
sudo make install
Refinery CMS 2.0.x
Rendering submenu - expanding 1 level deeper branch step-by-step
Example:
1)
- Home # Click here
- Contact
2)
- Home
Vagrant.configure("2") do |config|
config.vm.box = "base"
# strat with Vagrant configuration v2 need specify VM provider
config.vm.provider :virtualbox do |vb|
file_to_disk = '/tmp/large_disk.vdi'
# disk size 50GB
vb.customize ['createhd', '--filename', file_to_disk, '--size', 50 * 1024]
vb.customize ['storageattach', :id, '--storagectl', 'SATA', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black