!SLIDE
!SLIDE
| update | |
| upgrade | |
| tap homebrew/binary || true | |
| tap phinze/homebrew-cask || true | |
| install brew-cask | |
| install ack | |
| install android-sdk | |
| install autoconf |
| #!/usr/bin/env bash | |
| # Copyright (c) 2011 Tomohito Ozaki(yuroyoro) | |
| # 2014 Ken Kaizu(krrrr38) | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions | |
| # are met: | |
| # |
| #!/usr/bin/env perl | |
| use strict; | |
| use utf8; | |
| use Data::Dumper::Concise; | |
| sub hoge(&;$) { | |
| my $a = shift; | |
| warn Dumper($a); | |
| return $a->(); |
| package main | |
| import "fmt" | |
| func rec(depth int, ch chan int) { | |
| if depth > 3 { | |
| return | |
| } else { | |
| ch <- depth | |
| rec(depth+1, ch) // cannot be gorouting |
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| type Fetcher interface { | |
| // Fetch returns the body of URL and | |
| // a slice of URLs found on that page. |
| # -*- coding: utf-8 -*- | |
| ############################## | |
| ##### Working with lists ##### | |
| ############################## | |
| def last(ls) | |
| ls[-1] | |
| end |
| scala> case class InvalidData(i: Int) | |
| defined class InvalidData | |
| scala> def firstProcess(i: Int): Either[InvalidData, Int] = try{ Right(10 / i) } catch { case _: Throwable => Left(InvalidData(i)) } | |
| firstProcess: (i: Int)Either[InvalidData,Int] | |
| scala> def secondProcess(d: InvalidData): Either[InvalidData, Int] = try{ Right(10 + d.i) } catch { case _: Throwable => Left(InvalidData(d.i)) } | |
| secondProcess: (d: InvalidData)Either[InvalidData,Int] | |
| scala> for { a <- firstProcess(2).left; b <- secondProcess(a).right } yield b |
| import java.lang.reflect.Constructor | |
| import providers.HatenaProvider | |
| import securesocial.core.RuntimeEnvironment | |
| import securesocial.core.providers._ | |
| import service.{DemoUser, MyEventListener, InMemoryUserService} | |
| import scala.collection.immutable.ListMap | |
| object Global extends play.api.GlobalSettings { |
!SLIDE
!SLIDE
| # http://openresty.org/ : with lua | |
| groupadd -g 501 nginx | |
| sudo useradd -g nginx -u 501 -s /sbin/nologin -d /var/www nginx | |
| sudo yum install -y gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel | |
| # normal nginx (or --prefix=/usr/local/nginx) | |
| ./configure \ | |
| --user=nginx \ | |
| --group=nginx \ |