Skip to content

Instantly share code, notes, and snippets.

View 53ningen's full-sized avatar
🐰
Is the Order a Rabbit?

gomi_ningen 53ningen

🐰
Is the Order a Rabbit?
View GitHub Profile
@nishio
nishio / gist:8378624
Last active October 28, 2017 17:53
プロシン抽象化セッションのまとめ
■未検討の疑問点
・抽象的に考えるにはどのような環境・制約が必要なのか?
・プログラムを書く上でどこまで抽象化するのか?
・抽象化をする上で適切な言語の選択はあるのか?
・OSのような強制的な抽象化とフレームワークのような非強制的な抽象化の共通点は?相違点は?
・抽象化は役に立つのか?何の役に立つのか?
 ・抽象化をよくやる人とそうでない人がいると思うが、後者が抽象化するメリットはあるのか?
  ・よくやる人とそうでない人を分けた理由は
 ・「抽象化は手段だ」説←何のための手段か?
・日常生活にも抽象化はあるのか?あるなら具体例は?
@gakuzzzz
gakuzzzz / article.md
Last active October 29, 2019 06:19
「Javaで継続モナド」をScalaに翻訳/Scala Advent Calendar 2013

「Javaで継続モナド」をScalaに翻訳

この記事はScala Advent Calendar 2013の7日目の記事です。

昨日は @shogogg さんのScala + sbt-android + IntelliJ で快適Androidアプリ開発でした。

明日は @takezoux2 さんのScalaのParserCombinator実践入門+です。

継続モナドを調べていたら、@terazzo さんのJavaで継続モナドという記事が非常に判りやすかったんですが、サンプルコードがJavaのボイラープレートの嵐でちょっと読むのが辛い感じだったのでScalaで翻訳してみました、というのがこの記事です。

@shinyaohira
shinyaohira / App States and Multitasking.md
Last active October 5, 2023 07:57
アプリケーションの状態とマルチタスキング

全体的に簡略化し、必要と思われる部分を抜粋しました。

  • Not running

    アプリは起動されていないか、実行されていたけれどもシステムによって終了されています。

  • Inactive

@eldesh
eldesh / banana.sml
Last active December 19, 2015 14:39
圏論勉強会 @ ワークスアプリケーションズ#8 http://nineties.github.io/category-seminar/8.html#/55 練習問題 回答
(**
* 圏論勉強会 @ ワークスアプリケーションズ#8
* http://nineties.github.io/category-seminar/8.html#/55
* 練習問題 回答
*
* 実行方法(for SML/NJ)
* $ cat banana.cm
* group
* is
* $/basis.cm
@tattyamm
tattyamm / gist:5967602
Last active March 8, 2016 00:48
コップ本 15章 ケースクラスとパターンマッチ

15.1 ケースクラスとパターンマッチ

今回扱う例:算術式を扱うサンプル Expr (Expression)

abstract classの中身を実装していく 変数、数値、単項演算(-, ++, !, ...)、二項演算(+, - , <, &&)

abstract class Expr
case class Var(name:String) extends Expr
case class Number(num:Double) extends Expr
@mala
mala / gist:5107120
Last active March 19, 2020 01:41
TwitterのOAuthの問題の補足とか

https://gist.github.com/mala/5062931

の続き。

Twitterの人に色々と問題点は伝えたんだけど、これからOAuthのサーバー書く人や、クライアント書く人が似たような問題を起こさないようにするために、どうすればいいのかについて簡単に書きます。既存の実装真似して作るとうっかりひどい目にあう。

自分は意図的に「Twitterの脆弱性」という表現を使わないように気を使っていて、それはクライアントアプリ側の責任もあるからなのだけれども、安全に実装するための方法がわかりにくかったり誤解を招きやすかったり、Twitterに買収されているTweetDeckにも問題があったりしたので、それはやっぱりTwitter側の責任の比重が大きいとは思う。とはいっても別に責任を追求したかったり◯◯はクソだといったことを言いたいわけではなく、誰が悪いとか言う以前に、複合的な要因によって問題が起きるときには原因を正しく理解する必要があると思う。

そもそも何を担保に安全性を保証しているのか

  • サーバー側で秘密の鍵を持っている(それが無いとアクセストークンを取得できない or 使えない)
@pkukielka
pkukielka / Factorial.java
Created May 31, 2012 10:25
Factorial in java with trampolines
import java.math.BigInteger;
class Trampoline<T>
{
public T get() { return null; }
public Trampoline<T> run() { return null; }
T execute() {
Trampoline<T> trampoline = this;
@andypiper
andypiper / nuget.sh
Created May 8, 2012 16:18
nuget for OS X
#!/bin/sh
# add a simple 'nuget' command to Mac OS X under Mono
# get NuGet.exe binary from http://nuget.codeplex.com/releases/view/58939
# get Microsoft.Build.dll from a Windows .NET 4.0 installation
# copy to /usr/local/bin and Robert is your father's brother....
#
PATH=/usr/local/bin:$PATH
mono --runtime=v4.0 /usr/local/bin/NuGet.exe $*
def index(id:String) = Action {
getFirstData(id)
}
private def getFirstData(id:String) = {
Cache.get(id) match {
case Some(id2) => getSecondData(id2)
case None => NotFound
}
}
private def getSecondData(id2:String) = {
@mbinna
mbinna / hack.sh
Created April 11, 2012 05:57 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh
#