Skip to content

Instantly share code, notes, and snippets.

!SLIDE
# 今日のお題
## ActionController
!SLIDE
* ActionDispatch が dispatch する先
* MVC の まさに C(まさに)
total 0
drwxr-xr-x 7 takafumi staff 238 Sep 30 20:01 Align
drwxr-xr-x 8 takafumi staff 272 Sep 30 20:01 Gundo
drwxr-xr-x 7 takafumi staff 238 Sep 30 20:01 L9
drwxr-xr-x 8 takafumi staff 272 Sep 30 20:01 TweetVim
drwxr-xr-x 7 takafumi staff 238 Sep 30 20:01 autodirmake.vim
drwxr-xr-x 6 takafumi staff 204 Sep 30 20:01 cecutil
drwxr-xr-x 9 takafumi staff 306 Sep 30 20:02 codic-vim
drwxr-xr-x 8 takafumi staff 272 Feb 24 07:15 ctrlp.vim
drwxr-xr-x 8 takafumi staff 272 Sep 30 20:02 current-func-info.vim
@totem3
totem3 / a.rs
Last active October 11, 2016 20:34
// https://play.rust-lang.org/?gist=cce473b90dd798d61725d50295026f33&version=stable&backtrace=0
fn main() {
let vec = vec![2, 3, 4, 5];
// let res: Vec<Result<i32, String>> = vec.iter()
let res: Result<Vec<i32>, String> = vec.iter()
.map(|a| if a % 2 == 0 {
println!("a:{}", a);
Ok(a * 3)
} else {
Err(format!("Error! {} is odd value!", a))
@totem3
totem3 / server.c
Last active August 29, 2015 14:27
#include <sys/types.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
<div>
<span> <a href="hoge"></a>
</span>
</div>
@totem3
totem3 / file.md
Last active August 29, 2015 14:26 — forked from gakuzzzz/file.md
UserId など値型はどうするべきか

UserId などの型はどうするべきか

1. primitive 型をそのまま使う

case class Person(id: Long, name: String, organizationId: Long)
object Person {

  def groupByOrg: Map[Long, Seq[Person]] = ...
<meta name="ac-discovery" content="gist.githubusercontent.com https://github.com/totem3/containers/releases/download/0.0.1/test-container.{ext}">
<meta name="ac-discovery-pubkeys" content="gist.githubusercontent.com https://github.com/totem3/containers/releases/download/0.0.1/pubring.gpg">
@totem3
totem3 / cell.rb
Last active August 29, 2015 14:17
require 'celluloid'
require 'timeout'
Celluloid.task_class = Celluloid::TaskThread
class Worker
include Celluloid
def run(check)
puts "run"
#!/usr/bin/ruby
class Host
attr_reader *%i(name ip tags reported tn tmax dmax location gmond_started metrics)
def initialize(name, ip, tags, reported, tn, tmax, dmax, location, gmond_started, metrics)
@name = name
@ip = ip
@tags = tags
@reported = reported
@tn = tn