Skip to content

Instantly share code, notes, and snippets.

# rootユーザへ変更
sudo su -
# nginxリポジトリ設定
rpm -Uvh
yum clean all
yum update
# nginxインストール
nenono / FizzBuzz.scala
Last active October 16, 2015 16:18
// フィズバズ
object FizzBuzz{
def fizzBuzz(max: Int) = {
require(max > 0) // assertion
(1 to max) // 1~(max-1)のシーケンス生成。1 to maxの箇所は、オブジェクトの1引数メソッドの糖衣構文で、と同じ意味
.map( // お馴染みmap関数はLINQ風にメソッド呼び出し
(x: Int) => // lambda式もC#風と思うとわかりやすいです
(x % 3, x % 5) match { // タプル生成→パターンマッチで分岐する形はF#(ML)っぽく書けます
case (0, 0) => "FizzBuzz!"
case (0, _) => "Fizz!"
subfuzion /
Last active July 16, 2024 18:54
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

kmizu /
Created October 2, 2011 12:15





  • @robey Twitterの中の人。ScalaによるメッセージキューKestrelを作ったのもこの人。
  • @n8han 今話題のhttpツールキットUnfilteredの作者。NYのScalaエンジニアの中でも有名人。他にも、conscriptを初めとして、多数のプログラムを開発している。詳細は彼のgithub アカウント 参照。
koseki / jp-prefectures.html
Last active January 31, 2024 11:35
Japanese Prefectures 日本の都道府県 Text, JS, HTML 漢字, ローマ字, 都道府県コード
<option value="1">Hokkaido</option>
<option value="2">Aomori</option>
<option value="3">Iwate</option>
<option value="4">Miyagi</option>
<option value="5">Akita</option>
<option value="6">Yamagata</option>
<option value="7">Fukushima</option>
<option value="8">Ibaraki</option>
<option value="9">Tochigi</option>