Skip to content

Instantly share code, notes, and snippets.

View todokr's full-sized avatar
😻
Focusing

Shunsuke Tadokoro todokr

😻
Focusing
View GitHub Profile
@blue0513
blue0513 / 物件.md
Last active December 8, 2021 03:16
物件.md

blue の個人的な備忘録です

中古マンション購入までの流れ

  1. 都内 or 県外をざっくり決める
  2. マンション、一戸建てをざっくり決める
  3. 間取りをざっくり決める
  4. SUUMO をネットサーフィンしまくって、価格や設備、周辺環境の相場・相関を掴む
  5. 数件気になった物件を内見して、ネットで得た知識と現物を比較・体感する
  6. 希望する地域・物件などの価格相場はわかったので、FP さんに相談して我々が購入できる価格帯、新築or中古をすり合わせる
@lmdexpr
lmdexpr / ioscc.scala
Last active December 2, 2020 18:48
ScalaMatsuri2020 Scalaひどいコード選手権用 JSON parser だったもの
type S=Seq[_]
def o(a:Seq[(_,_)],? :S):(Map[_,_],S)= ?match{case'}'+:r=>a.toMap->r
case','+:r=>o(a,r)case? =>val m=""""(.+?)":(.+)""".r
val m(k,t)= ?mkString
val(v,r)=p()(t.toSeq)
o(a:+(k->v),r)}
def y(a:S):S=>(S,S)={case']'+:r=>a->r
case','+:r=>y(a)(r)case s=>val(v,r)=p()(s)
y(a:+v)(r)}
def u(a:S,b:S):(S,S)=b match{case c+:r=>c match{case'}'|']'=>a->b
@anvk
anvk / psql_useful_stat_queries.sql
Last active April 23, 2024 03:15
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@takezoe
takezoe / play2.6_highlight.md
Last active July 5, 2017 01:35
Play 2.6のハイライト

原文はこちら: https://www.playframework.com/documentation/2.6.x/Highlights26

グローバルステートが非推奨に

アプリケーションではplay.api.Play.current / play.Play.application()でグローバルアプリケーションにアクセスできるけど非推奨。以下のようにして禁止することもできる。

play.allowGlobalApplication=false
@aaronlevin
aaronlevin / events.hs
Last active December 3, 2023 13:03
LambdaWorld 2016 & Typelevel Summit 2017 (Copenhagen): Type-Level DSLs // Typeclass induction
-- Our goal is to create a type describing a list of events. This is our
-- type-level DSL.
-- We will then use typeclass resolution to "interpret" this type-level DSL
-- into two things:
-- 1. A comma-separated list of events
-- 2. A method that, when given an event name and a payload, will try to parse
-- that event type with the payload. A form of dynamic dispatching
--
-- To model a list of types we will use tuples. You can imagine the list of
-- types "Int, String, Char" to look like:

セキュリティのメモ

レスポンスメッセージ

  • ステータスライン

例: HTTP/1.1 200 OK

  • ヘッダ
    • Date
    • Server (Apache/2.2.14 Ubuntuとか)
    • Content-Length (ボディのバイト数)
  • Content-Type (MIMEタイプ text/plain, image/gifなど)
@hashrock
hashrock / diag.md
Last active February 26, 2024 05:51
作図系ツール・ライブラリまとめ

シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ

GraphViz

http://www.graphviz.org/

  • C製
  • Doxygen, Moinmoinなどと連携可能
  • ブロック図、クラス図、ネットワーク図など
@manjuraj
manjuraj / scalaz-validation.scala
Last active June 25, 2018 21:01
scalaz validation
//
// Validation[E, A] represents either:
// - Success[A]
// - Failure[E]
//
// Isomporphic to scala.Either[E, A] and scalaz.\/[E, A]
//
// Unlike \/[E, A], Validation is not a Monad, but an Applicative
// Functor. So if you want to use it as a Monad you can convert back
// and forth using the `validation` and `disjunction` method
@manjuraj
manjuraj / scalaz-disjunction.scala
Last active November 12, 2018 16:15
scalaz disjunction
//
// Disjunction - aka Scalaz Either
// \/[A, B] is an alternative to Either[A, B]
// -\/ is Left (usually represents failure by convention)
// \/- is Right (usually represents success by convention)
// Left or Right - which side of the Disjunction does the "-" appear?
//
// Prefer infix notation to express Disjunction Type v: String \/ Double
//
// References