- configure application.rb
- configure production.rb
- rails runner "SummaryMailer.summary.deliver" -e production
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RowParser | |
PATTERN = /^\s*([0-9]+)(\s*)(.*)\(cr=(\d+) r=(\d+) w=(\d+) time=(\d+)/ | |
KEYS = [ :ROW, :INDENT, :OPERATION, :CR, :R, :W, :TIME ] | |
def parse(line) | |
tokens = line.scan(PATTERN)[0] | |
format(Hash[*([ KEYS, tokens ].transpose).flatten]) unless tokens.nil? | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package msgpack; | |
import java.io.IOException; | |
import java.util.Collection; | |
import java.util.Set; | |
import javax.tools.DiagnosticCollector; | |
import javax.tools.JavaCompiler; | |
import javax.tools.JavaFileManager; | |
import javax.tools.JavaFileObject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" プラグインのロード | |
filetype off | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
set helpfile=$VIMRUNTIME/doc/help.txt | |
filetype plugin on | |
" 行番号を表示 | |
set number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package school | |
object ScalaSchoolAdvancedTypes { | |
implicit def strToInt(x: String) = x.toInt | |
/* | |
* クラスの型パラメータ | |
* | |
* A <% B : A が B として見れる |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>{{html-title}}</title> | |
<style> | |
@charset "UTF-8"; | |
/* begin: This code block is released into public domain */ | |
html, body, div, span, applet, object, h1, h2, h3, h4, h5, h6, p, | |
blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"cmd": ["/Users/monzou/.rvm/bin/rvm-auto-ruby", "$file"], | |
"file_regex": "^(…*?):([0-9]*):?([0-9]*)", | |
"selector": "source.ruby" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'rubygems' | |
require 'nokogiri' | |
hash = Hash.new | |
names = [ "account1", "account2" ] | |
names.each do |name| | |
doc = Nokogiri::XML(File.open("#{name}.xml")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fssm' | |
require 'thread' | |
PATH = "/Users/monzou/sample.txt" | |
class Monitor | |
def start(&block) | |
puts "start monitoring @ #{Thread.current}" | |
monitor = FSSM::Monitor.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fssm' | |
require 'time' | |
require 'nokogiri' | |
USER_DIR = "/Users/monzou" | |
BACKUP_DIR = "#{USER_DIR}/Dropbox/DayOne" | |
BACKUP_EXTENSION = "txt" | |
DAYONE_ENTRIES_PATH = "#{USER_DIR}/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone/entries" | |
def monitor |