Skip to content

Instantly share code, notes, and snippets.

View tunglam14's full-sized avatar

Lam Dang Tung tunglam14

View GitHub Profile

User API

User attributes:

- id `(Number)` : unique identifier.
- fname `(String)` : First Name.
- lname `(String)` : Last Name.
- email `(String)` : email id of the user.
@tunglam14
tunglam14 / rbenv.sh
Created May 2, 2016 02:56
rbenv installer
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
echo 'export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)"
fi' >> ~/.bashrc
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@tunglam14
tunglam14 / config.cfg
Created March 5, 2016 09:18
CS 1.6 config
// This file is overwritten whenever you change your user settings in the game.
// Add custom configurations to the file "userconfig.cfg".
unbindall
bind "TAB" "+showscores"
bind "ENTER" "+attack"
bind "ESCAPE" "cancelselect"
bind "SPACE" "+jump"
bind "'" "+moveup"
bind "+" "sizeup"
@tunglam14
tunglam14 / canvas-lms.md
Last active October 1, 2015 04:16
Installing canvas lms

Server specifications

  • Ubuntu 12.04
  • 2GB RAM, 1 CPU (Min)

Dependencies

  • Ruby 2.1
  • bundler
  • Nodejs 0.10
@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>
-- 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
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
123
#! /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