Skip to content

Instantly share code, notes, and snippets.

@abe33
abe33 / requirePackages.coffee
Last active August 29, 2015 14:08
Requires many Atom packages as a promise
atom.packages.requirePackages = (packages...) ->
new Promise (resolve, reject) ->
required = []
promises = []
failures = []
remains = packages.length
solved = ->
remains--
@mbrandonw
mbrandonw / 1-Functor-and-Monad.md
Last active June 4, 2022 02:12
Swift Functor and Monad

Copy and paste the swift code below into a playground to experiment.

This is a very close emulation of Functor and Monad typeclasses in swift. However, it is very fragile (i.e. easy to crash the compiler).

For example, instance methods of fmap will run fine, but attempting to use a globally defined fmap that acts on Functor types will cause a crash. Similarly for bind. Unfortunately this means we cannot define the nice infix operator versions of these functions.

@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@xdissent
xdissent / errors.coffee
Created May 27, 2014 16:03
Extendable native Error subclasses in Coffeescript
ok = (ok) -> console.log if ok then 'ok' else 'FAIL'
FnError = (message) ->
@name = 'FnError'
@message = message
@stack = (new Error).stack
FnError:: = new Error
@voluntas
voluntas / erlang.rst
Last active March 15, 2024 13:15
実践 Erlang/OTP コトハジメ 2014.11

実践 Erlang/OTP コトハジメ 2014.11

更新

2014-11-20

バージョン

0.0.5

作者

@voluntas

URL

http://voluntas.github.io/

概要

" buffer書き換え前
let s:mychangedtick = b:changedtick
" buffer書き換えて操作
" ...
" 書き換え後に
" for tpope/vim-repeat
if exists('g:repeat_tick')
if g:repeat_tick == s:mychangedtick
let g:ezbar = {'separator_L': '', 'separator_R': ''}
let g:ezbar.active = [
\ 'winbufnum', 'dir',
\ 'filename',
\ {'chg_color': {'gui': ['SlateGray', 'white', 'bold']}},
\ 'filetype',
\ 'modified',
\ 'currentfuncrow',
\ {'__SEP__': 'StatusLine'},
\ 'cfi',
@Kuniwak
Kuniwak / 2013_11_15_githubjp_note.markdown
Last active October 30, 2018 07:06
「GitHub トレーニングチームから学ぶ Git の内部構造」のノートです。 曖昧なところもあるので、間違いがあったら教えてください! http://connpass.com/event/3808/

GitHub トレーニングチームから学ぶ Git の内部構造

Graphs, Hashes, and Compression, Oh My!

Hash について

従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。

"" Option parser.
""
"" Arguments
"" [
"" {
"" \ 'short': 'X',
"" \ 'long': '--xxx',
"" \ 'output': 'name',
"" \ 'has_value': 1,
"" \ 'default': 'some_value',