Skip to content

Instantly share code, notes, and snippets.

View smahi's full-sized avatar

Abesse Smahi smahi

  • Tamanrasset / Algeria
View GitHub Profile
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
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
Refinery CMS 2.0.x
Rendering submenu - expanding 1 level deeper branch step-by-step
Example:
1)
- Home # Click here
- Contact
2)
- Home
#!/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

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

# 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
@smahi
smahi / gist:ef60175356440dc2cfb6
Last active August 29, 2015 14:01
How to create your own git server

Creating Git server

Install git-core

$ sudo apt-get update
$ sudo apt-get install git-core

Create git user

$ sudo adduser git

Create the repo on the server

$ su git
@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
#!/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
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
ar:
devise:
confirmations:
confirmed: "لقد تم تأكيد حسابك بنجاح، وتم تسجيل دخولك."
send_instructions: "ستصلك خلال دقائق رسالة على بريدك الإلكتروني تتضمن الخطوات اللازمة لتأكيد حسابك."
send_paranoid_instructions: "إذا كان بريدك الإلكتروني مسجلاً عندنا فستصل إليه خلال دقائق رسالة تتضمن الخطوات اللازمة لتأكيد حسابك."
failure:
already_authenticated: "تم تسجيل دخولك مسبقاً."