Skip to content

Instantly share code, notes, and snippets.

# rootユーザへ変更
sudo su -
# nginxリポジトリ設定
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum clean all
yum update
# nginxインストール
@nenono
nenono / FizzBuzz.scala
Last active October 16, 2015 16:18
ScalaでFizzBuzz
// フィズバズ
object FizzBuzz{
def fizzBuzz(max: Int) = {
require(max > 0) // assertion
(1 to max) // 1~(max-1)のシーケンス生成。1 to maxの箇所は、オブジェクトの1引数メソッドの糖衣構文で、1.to(max)と同じ意味
.map( // お馴染みmap関数はLINQ風にメソッド呼び出し
(x: Int) => // lambda式もC#風と思うとわかりやすいです
(x % 3, x % 5) match { // タプル生成→パターンマッチで分岐する形はF#(ML)っぽく書けます
case (0, 0) => "FizzBuzz!"
case (0, _) => "Fizz!"
@subfuzion
subfuzion / global-gitignore.md
Last active March 25, 2024 05:13
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
kmizu / recommendation.md
Created October 2, 2011 12:15
ウォッチすべきScalaエンジニア(海外/日本人)のTwitterアカウント

フォローしておいた方がいいようなScalaエンジニア(海外勢/日本人)のTwitterアカウント

概要

海外勢/日本人のScala(エンジニア/ユーザ)の中で、特にフォローしておくといい方のTwitterアカウントを集めてみました。作成途中なので、突っ込み歓迎。fork歓迎。

海外

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