Skip to content

Instantly share code, notes, and snippets.

View Y4suyuki's full-sized avatar
🏠
Working from home

Yasuyuki Ageishi Y4suyuki

🏠
Working from home
  • USJ LLC
  • Osaka, Japan
View GitHub Profile
@Y4suyuki
Y4suyuki / _.md
Created January 25, 2014 16:37
crossfilterIntro

| One | Many | --- | --- | --- | Synchronous | T/Try[T] | Iterable[T] Asynchronous | Future[T] | Observable[T]

A simple adventure game

trait Adventure {
  def collectCoins(): List[Coin] = {
@Y4suyuki
Y4suyuki / README.md
Last active March 14, 2022 08:00
Monad

Monad

What is Monad?

A monad M is a parametric type M[T] with two operations flatMap and unit that have to satisfy some laws.

trait M[T] {
  def flatMap[U](f: T => M[U]): M[U]
}

def unit[T](x: T): M[T]
function pdiagonal(d, i) {
var p0 = d.source,
p3 = d.target,
m = ( p0.y + p3.y ) / 2,
sizeOfChild = p0.children.map(function(d) { return d.size; });
function searchObj(lob, obj) {
for (var i = 0; i < lob.length; i++) {
if (lob[i].x == obj.x && lob[i].y == obj.y) {
return i
@Y4suyuki
Y4suyuki / _.md
Created October 7, 2013 08:33
cluster toggle
@Y4suyuki
Y4suyuki / _.md
Created October 7, 2013 07:54
cluster basics
@Y4suyuki
Y4suyuki / print_anim.py
Created October 3, 2013 06:22
python script which print animation on console
import time
import sys
animation = "|/-\\"
for i in range(100):
time.sleep(0.1)
sys.stdout.write("\r" + animation[i % len(animation)])
sys.stdout.flush()
@Y4suyuki
Y4suyuki / smlmj_cheat.md
Last active August 28, 2016 23:56
Coursera Programming Language SML/NJ cheatsheet

#SML/NJ cheatsheet ##Types and expression

  • unit :
();
  • boolean :
true;
false;
@Y4suyuki
Y4suyuki / README.md
Last active December 24, 2015 07:58
Trouble with git credential-osxkeychain error: git-credential-osxkeychain died of signal 11 ref: http://fictional.in/updating_git-credential-osxkeychain/

Trouble with git credential-osxkeychain

When I tried push to my repository I got an error

>>>git push -u origin master
error: git-credential-osxkeychain died of signal 11

After searched web, I found this blog post. It seems to be that there's a bug in git-credential-osxkeychain so simply replace that with new one on S3.

&gt;&gt;&gt;which git git-credential-osxkeychain
@Y4suyuki
Y4suyuki / _.md
Created September 30, 2013 09:13
datetime practice