Skip to content

Instantly share code, notes, and snippets.

View omiend's full-sized avatar
🦌
CrawlingElk

omiend omiend

🦌
CrawlingElk
  • tokyo / japan
  • 08:30 (UTC +09:00)
  • X @omiend
View GitHub Profile
@omiend
omiend / ScalaMemo.md
Last active July 15, 2016 00:24
Scalaメモ

Scala

特徴

  • Javaと同じくJVM上で動作する
  • コンパイルするとclassファイルになる
  • つまり、これまで作られてきたJavaプロダクトのすべてをScalaから使うこともできる
  • 逆も然りで、JavaからもScalaのプロダクトを使うことができる
  • コレクション周りのライブラリがとにかく強力
  • すべてがオブジェクト(インスタンス、変数、関数、メソッド)
@omiend
omiend / gist:190413fb0a4a9f738bb7
Created July 7, 2015 09:43
Three.js - LifeGame - Colorful
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>三次元ライフゲーム</title>
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/three.js"></script><!-- Three.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/TrackballControls.js"></script><!-- TrackballControls.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/jquery-2.1.4.min.js"></script>
</head>
<body>
@omiend
omiend / gist:7416d1e832e311d2e37e
Created July 7, 2015 09:43
Three.js - LifeGame - Another generation color
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>三次元ライフゲーム</title>
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/three.js"></script><!-- Three.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/TrackballControls.js"></script><!-- TrackballControls.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/jquery-2.1.4.min.js"></script>
</head>
<body>
@omiend
omiend / gist:108d9a1c672f29ca9e92
Created July 7, 2015 09:40
Three.js - LifeGame - 3D
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>二次元ライフゲーム</title>
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/three.js"></script><!-- Three.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/TrackballControls.js"></script><!-- TrackballControls.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/jquery-2.1.4.min.js"></script>
</head>
<body>
@omiend
omiend / gist:0f57cbd6baa38b317a7a
Created July 7, 2015 09:40
Three.js - LifeGame - 2D
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>二次元ライフゲーム</title>
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/three.js"></script><!-- Three.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/TrackballControls.js"></script><!-- TrackballControls.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHfm9kR1ZYdW1MYUtsLXhZV3Q4a3ZLQjgyWnZQZGF4MXpDYnZZNk9DRUg0QXM/javascript/jquery-2.1.4.min.js"></script>
</head>
<body>
@omiend
omiend / gist:154c5b767b733c850dec
Created May 20, 2015 00:07
【git】一つ前のスタッシュで復元
#!/bin/sh
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree stash pop stash@{0}
@omiend
omiend / gist:e5f1974052e0ebc22006
Last active August 29, 2015 14:20
【git】現在日付でスタッシュ
#!/bin/sh
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree stash save `date`
@omiend
omiend / gist:f7c9a3e365bd05c5cad4
Last active August 29, 2015 14:15
LifeGame(三次元)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>三次元ライフゲーム</title>
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHZDM5XzZPS1JQd3c"></script><!-- Three.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHcDEtSGpLV20zRjg"></script><!-- TrackballControls.js -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
@omiend
omiend / gist:89220e5b9ce773da6d7f
Last active August 29, 2015 14:15
LifeGame(二次元)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>二次元ライフゲーム</title>
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHZDM5XzZPS1JQd3c"></script><!-- Three.js -->
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHcDEtSGpLV20zRjg"></script><!-- TrackballControls.js -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
@omiend
omiend / gist:0172e63accbae7fd5cc0
Created December 25, 2014 05:06
うるう年
object Uruu {
def main(args: Array[String]) = {
List.range(1983, 2017) foreach { year =>
println(s"${year} = ${year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)}")
}
}
}