Skip to content

Instantly share code, notes, and snippets.

View tunglam14's full-sized avatar

Lam Dang Tung tunglam14

View GitHub Profile
#! /bin/bash
# l-a-m-d-t
# Use: ./salt-minion-installer.sh salt.master.address
# Example: ./salt-minion-installer.sh 10.2.2.2
# remove older salt
apt-get -y remove --purge ^salt-*
rm -rf /etc/salt /var/cache/salt
@tunglam14
tunglam14 / 123
Created January 15, 2015 08:32
123
~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-headers-virtual linux-virtual
The following packages will be upgraded:
linux-headers-virtual linux-virtual
2 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
sudo apt-get update
sudo apt-get install -y git gcc g++ libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev build-essential libsqlite3-dev libreadline-dev
curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
echo """
export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# -*- coding: utf-8 -*-
'''
Management of dockers
=====================
.. versionadded:: Hydrogen
.. note::
The DockerIO integration is still in beta; the API is subject to change
# remove all docker containers and images
docker stop $(docker ps -a | awk '{print $1}' | grep -v CONTAINER)
docker rm $(docker ps -a | awk '{print $1}' | grep -v CONTAINER)
docker rmi $(docker images -a | awk '{print $3}' | grep -v IMAGE)
upstream app_name {
server unix:/usr/local/app_name/tmp/sockets/unicorn.sock;
}
server {
listen 80;
server_name localhost;
root /usr/local/app_name/public;
server_tokens off;
start on runlevel [2345]
stop on runlevel [!2345]
chdir /usr/local/app_name
setuid ubuntu
setgid ubuntu
post-start script
exec bundle exec unicorn_rails -c config/unicorn.rb -D -E production
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@tunglam14
tunglam14 / fix_gpg_key_erro.sh
Created August 1, 2013 03:03
W: GPG error: http://domain.com unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
sudo apt-key adv –keyserver pgp.mit.edu –recv-keys 40976EAF437D05B5
# or
gpg --keyserver subkeys.pgp.net --recv-keys 40976EAF437D05B5
gpg --armor --export 40976EAF437D05B5 | sudo apt-key add -