整理自 KKBOX 討論區的「KKBOX 授權擁有的動漫卡通音樂 集中帖」的第一頁(討論串樓主整理的)
需注意後面零星的歌單並沒有整理到這裡
這個 gist 是整理到 ACG Music (Taiwan) 前整理用 temp。
《劇場版 主題曲》Link-L'Arc-en-Ciel(彩虹樂團)
整理自 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) |
class Notifier | |
def initialize(voice) | |
@voice | |
end | |
def sprint | |
say "sprint" | |
puts %( | |
###### ######## ######## #### ## ## ######## | |
## ## ## ## ## ## ## ### ## ## |
module Timer | |
def times(env) | |
value_s = env['interval'] | |
if value_s == nil | |
raise "interval missing" | |
end | |
value = Integer(value_s) | |
if value <= 0 | |
raise "interval should be > 0" |
content = "這是標題之前<h1>這是標題</h1>這是標題之後" | |
content.gsub(/\<h1(.*)\<\/h1\>/, '<h2\1</h2>') | |
=> "這是標題之前<h2>這是標題</h2>這是標題之後" | |
# 重點在於 match 時的 () 包起來的東西變成 \1 (但必須用單引號 '' 才有效) |
# source: http://jokercatz.blogspot.tw/2013/09/rails-get-all-models.html | |
#first load all models | |
Rails.application.eager_load! | |
#okay…each now :) | |
ActiveRecord::Base.send(:subclasses).each do |model| | |
puts model.name | |
end |
require 'benchmark' | |
require "active_support/core_ext/object/blank" | |
TIMES = 1000000 | |
Benchmark.bmbm do |x| | |
x.report("if present? (actually present)") do | |
TIMES.times do | |
if "1".present? |
# encoding: utf-8 | |
# work-around from http://stackoverflow.com/a/15017892 | |
required_version_gems = %w( | |
awesome_print-1.2.0 | |
hirb-0.7.2 | |
hirb-unicode-0.0.5 | |
unicode-display_width-0.1.1 | |
) | |
required_version_gems.each do |version_gem| |
File.open("/usr/local/widgets/data").each do |line|
puts line if line =~ /blue/
end
logfile = File.new("/tmp/log", "w")
logfile.close