Skip to content

Instantly share code, notes, and snippets.

View aereal's full-sized avatar

aereal aereal

View GitHub Profile
✘╹◡╹✘ < for char in {a..z}; do; which $char; done;
a not found
b not found
c not found
d not found
e not found
f not found
g not found
h not found
i not found
✘╹◡╹✘ < sbt run
[info] Set current project to scala-playground (in build file:/Users/aereal/devel/src/github.com/aereal/scala-playground/)
[info] Compiling 1 Scala source to /Users/aereal/devel/src/github.com/aereal/scala-playground/target/scala-2.11/classes...
[error] /Users/aereal/devel/src/github.com/aereal/scala-playground/App.scala:7: not found: type ?
[error] val v = Applicative[ValidationNel[String, ?]]
[error] ^
[error] /Users/aereal/devel/src/github.com/aereal/scala-playground/App.scala:7: scalaz.ValidationNel[String,<error>] takes no type parameters, expected: one
[error] val v = Applicative[ValidationNel[String, ?]]
[error] ^
[error] /Users/aereal/devel/src/github.com/aereal/scala-playground/App.scala:7: ambiguous implicit values:
set nocompatible
" set &runtimepath
set runtimepath^=/Users/aereal/devel/src/github.com/Shougo/neobundle.vim
call neobundle#begin('/Users/aereal/devel/src/github.com/Shougo/neobundle.vim')
NeoBundle 'Shougo/unite.vim'
if neobundle#tap('unite.vim')
let bundle = {}
function! bundle.base() dict
return '~/devel/src/github.com/Shougo'
#!/usr/bin/env ruby
require 'fileutils'
require 'pathname'
class SourceRepo
def initialize(path)
@path = path
@components = Pathname.new(path).each_filename.entries
@root = ['', @components[0...-3]].join('/')
#!/usr/bin/env ruby
require 'pathname'
DEVEL_PATH = ENV['DEVEL_PATH']
HOMEBREW_ROOT = `brew --prefix`.strip
SRC_ROOT = File.join(DEVEL_PATH, 'src', 'github.com')
HOMEBREW_TAPS_ROOT = File.join(HOMEBREW_ROOT, 'Library', 'Taps')
class HomebrewTap
@aereal
aereal / mp.ts
Last active December 9, 2015 05:41
class MP<T> extends Promise<T> {
filter<T>(pred: (v: T) => boolean): MP<T> {
return this.then((v) => { return pred(v) ? v : new Error() })
}
}
function aggregate<T>(f: (ts: T[]) => void, wait: number): (t: T) => void {
let lastFiredAt = new Date();
let stack: T[] = [];
return (t: T): void => {
stack.push(t);
const calledAt = new Date();
const elapsed = calledAt.getTime() - lastFiredAt.getTime();
if (elapsed >= wait) {
f(stack);
stack = [];
abstract class M<A> {
abstract flatMap<B>(f: (a: A) => M<B>): M<B>;
}
abstract class MX<A> extends M<A> {
abstract flatMap<B>(f: (a: A) => MX<B>): MX<B>; // if omitted: error TS2339: Property 'flatMap' does not exist on type 'MX<A>'.
map<B>(f: (a: A) => B): MX<B> { return this.flatMap((a) => { return this.unit(f(a)) }) }
unit<A>(a: A): MX<A> { return new MX<A>(a) }
}
class N<A> extends MX<A> {
constructor(private value: A) {}
# environment
export HOMEBREW_PATH=/usr/local
export GOPATH=$HOME/.go
path=(
$HOME/bin(N-/)
$HOME/.rbenv/shims(N-/)
$HOME/.plenv/shims(N-/)
$HOME/.ndenv/shims(N-/)
$GOPATH/bin(N-/)
img,legend{border:0}dl,legend,li,ol,td,th,ul{padding:0}@font-face{font-family:'Noto Sans Japanese';font-style:normal;font-weight:100;src:url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Thin.woff2) format('woff2'),url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Thin.woff) format('woff'),url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Thin.otf) format('opentype')}@font-face{font-family:'Noto Sans Japanese';font-style:normal;font-weight:200;src:url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Light.woff2) format('woff2'),url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Light.woff) format('woff'),url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Light.otf) format('opentype')}@font-face{font-family:'Noto Sans Japanese';font-style:normal;font-weight:300;src:url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-DemiLight.woff2) format('woff2'),url(//fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-DemiLight.woff) format('woff'),url(//fonts.gstatic.com/ea