Skip to content

Instantly share code, notes, and snippets.

View tunglam14's full-sized avatar

Lam Dang Tung tunglam14

View GitHub Profile
# 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)
# -*- coding: utf-8 -*-
'''
Management of dockers
=====================
.. versionadded:: Hydrogen
.. note::
The DockerIO integration is still in beta; the API is subject to change
# 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".
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
@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.
#! /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
123
To avoid problems please:
- Use mdm as a display manager:
sudo apt-get install mdm
sudo dpkg-reconfigure mdm
- Remove overlay-scrollbars:
gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false
More info: https://launchpad.net/~lestcape/+archive/ubuntu/cinnamon
Press [ENTER] to continue or ctrl-c to cancel adding it
-- Lua 5.3
-- http://www.familug.org/2015/05/golang-tinh-tu-cung-9gag.html#more
function sum(str)
_s = 0
for i = 1, string.len(str) do
_s = _s + str:lower():byte(i) - string.byte('a') + 1
end
@tunglam14
tunglam14 / sign.html
Last active August 29, 2015 14:24
lam sign
<table>
<tr>
<td valign="top" style="padding: 0 8px 0 0;">
<div style="float: left; display: ;">
<img width="80" height="80" src="https://s.gravatar.com/avatar/0c0793406976ebfc27ec75d63c9a03cb?s=80" style="order-radius: 50%;moz-border-radius: 50%;khtml-border-radius: 50%;o-border-radius: 50%;webkit-border-radius: 50%;ms-border-radius: 50%;"/>
</div>
</td>
<td valign="top" style="border-left: 1px solid #d2dfe8; padding: 0 0 0 8px;">
<div style="display: ;">
<span style="font-size: 15px; font-family: 'arial'; font-weight: bold;">Dang Tung Lam (Mr)</span>