- 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
main = print largest | |
largest :: Integer | |
largest = head (filter p [ 100000, 99999 .. ]) | |
where p x = x `mod` 3829 == 0 |
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
main = print $ quicksort [ 10, 2, 5, 3, 1, 6, 7, 2, 3, 4, 8, 9 ] | |
quicksort :: (Ord a) => [a] -> [a] | |
quicksort [] = [] | |
quicksort (x:xs) = | |
let | |
le = filter (<= x) xs | |
gt = filter (> x) xs | |
in quicksort le ++ [x] ++ quicksort gt |
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
dummy |
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 |
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
# 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
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
<!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
package school | |
object ScalaSchoolAdvancedTypes { | |
implicit def strToInt(x: String) = x.toInt | |
/* | |
* クラスの型パラメータ | |
* | |
* A <% B : A が B として見れる |