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--
Elixir/Mix入門
## 概要
- elixir / erlang vm へコンパイルされる言語。コンパイラ。
- mix / elixirのプロジェクト管理ツール。elixirインストール時に入る
```diff:aaaaaa
aaaa
```
let s:id_counter = 0
let s:klass = {'_class_': ['Klass'], '_id_': 0}
" クラスの作成
function! s:klass.create(...) dict
let object = deepcopy(self)
let class = copy(self._class_)
for c in get(a:1, '_class_', [])
call add(class, c)
endfor
#!/bin/bash
true=":"
false="/bin/false"
success=0
failure=1
@uasi
uasi / gist:214109
Last active September 11, 2015 03:06
Show branch name in Zsh's right prompt
#
# Show branch name in Zsh's right prompt
#
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
setopt prompt_subst
function rprompt-git-current-branch {
local name st color gitdir action
class Application
def call(request, response)
response.write(request, "hello", 200, {})
10.times do |body|
response.write(request, body)
end
response.close
end
function! s:BundleGet() "{{{
let bundle_dir = expand('~/.vim/bundle')
try
let org_cwd = getcwd()
silent lcd `=bundle_dir`
let repo = matchstr(getline('.'), 'BUNDLE:\s\+\zs.*')
if repo != ''
let local_name = substitute(fnamemodify(repo, ':t'),
\ '^\%\(vim-\)\?\(.*\).git','\1', '')
if isdirectory(local_name)
@codelahoma
codelahoma / sicp1.coffee.md
Created June 9, 2013 20:27
A SICP of Coffee - A weekend experiment by @codelahoma

A SICP of Coffee

A weekend experiment by @codelahoma

Chapter 1 - Building Abstractions with Procedures

Mostly for grins, and partly to get a feel

"" Option parser.
""
"" Arguments
"" [
"" {
"" \ 'short': 'X',
"" \ 'long': '--xxx',
"" \ 'output': 'name',
"" \ 'has_value': 1,
"" \ 'default': 'some_value',
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',