usermod -a -G sudo USERNAME
or
usermod -a -G admin USERNAME
usermod -a -G sudo USERNAME
or
usermod -a -G admin USERNAME
# ruby Fixnum# year/month/day | |
class Fixnum | |
def minutes | |
self*60 | |
end | |
def hours | |
self*60*60 | |
end | |
def days |
## with_indifferent_access | |
1.9.2p290 :018 > h = {:a=>1, "b"=>2, :c=>3} | |
# => {:a=>1, "b"=>2, :c=>3} | |
1.9.2p290 :019 > h = h.with_indifferent_access | |
# => {"a"=>1, "b"=>2, "c"=>3} | |
1.9.2p290 :020 > h["b"] | |
# => 2 | |
1.9.2p290 :021 > h[:b] | |
# => 2 |
ActiveRecord::Base.logger.level = Logger::INFO | |
# from http://lexsheehan.blogspot.tw/2013/04/temporarily-disable-executed-sql.html |
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential git-core curl libssl-dev \ | |
libreadline5 \ | |
zlib1g zlib1g-dev \ | |
libmysqlclient-dev \ | |
libcurl4-openssl-dev \ | |
libxslt-dev libxml2-dev |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
整理自 KKBOX 討論區的「KKBOX 授權擁有的動漫卡通音樂 集中帖」的第一頁(討論串樓主整理的)
需注意後面零星的歌單並沒有整理到這裡
這個 gist 是整理到 ACG Music (Taiwan) 前整理用 temp。
《劇場版 主題曲》Link-L'Arc-en-Ciel(彩虹樂團)
# encoding: utf-8 | |
# inspired by http://jsbin.com/nuhinuda/1/edit | |
def | |
"U+2004 THREE-PER-EM SPACE" | |
end | |
def | |
"U+2005 FOUR-PER-EM SPACE" |
#!/usr/bin/env ruby -w | |
require 'csv' | |
# 1. Create a class with same initialization arguments as BIGMETHOD | |
# 2. Copy & Paste the method's body in the new class, with no arguments | |
# 3. Replace original method with a call to the new class | |
# 4. Apply "Intention Revealing Method" to the new class. Woot! | |
class FormatterNew | |
def initialize(file_name) |