I hereby claim:
- I am jhbabon on github.
- I am jhbabon (https://keybase.io/jhbabon) on keybase.
- I have a public key ASAjX5xO3GLE4GUqMipG9mhji5tjhMfAFM9MVfe1ZdTyiAo
To claim this, I am signing this object:
| ---Bring Rust's Option enum to lua, more or less | |
| ---@module 'option' | |
| ---@class Option<any> | |
| ---@field is_some fun(): boolean | |
| ---@field is_none fun(): boolean | |
| ---@field unwrap fun(): nil|any | |
| ---@field _and fun(opt: Option<any>): Option<any> | |
| ---@field _or fun(opt: Option<any>): Option<any> | |
| ---@field and_then fun(callback: fun(value: any): Option<any>): Option<any> |
| /** | |
| * Type Option represents an optional value: every option is either Some and contains a value, | |
| * or None, and does not. | |
| * | |
| * The main idea behind Option is to prevent the abuse of null|undefined through the code | |
| * and to enforce safe value checking through the type system. The absence of something is | |
| * explicit thanks to None. | |
| * | |
| * @example Using basic is* methods | |
| * |
| import { env } from 'process' | |
| function isNumber(n: unknown): n is number { | |
| if (typeof n !== 'number' || Number.isNaN(n)) { | |
| return false | |
| } | |
| return true | |
| } |
| setopt hist_ignore_all_dups | |
| # based on: https://gist.github.com/dohq/9b97e07c865bb608108dd254b5e32fea | |
| function scout-history() { | |
| BUFFER=$(history -n -r 1 | scout --inline --lines=10 --search="$LBUFFER") | |
| CURSOR=$#BUFFER | |
| zle clear-screen | |
| } | |
| zle -N scout-history | |
| bindkey '^r' scout-history |
| " see: http://vimcasts.org/episodes/search-for-the-selected-text/ | |
| function! s:VScoutSearch(cmdtype) | |
| let temp = @s | |
| norm! gv"sy | |
| let s:selection = @s | |
| let @s = temp | |
| if a:cmdtype == 'files' | |
| call scout#files#run({ 'search': s:selection }) | |
| endif |
I hereby claim:
To claim this, I am signing this object:
| require_relative 'visitor' | |
| require_relative 'visitable' | |
| class Object | |
| include Visitable | |
| end | |
| class Log < Visitor | |
| def visit_Array(array) | |
| puts 'Logging array:' |
| build_package_reconfigure() { | |
| test -f configure || autoconf | |
| } | |
| build_package_patch_ruby_railsexpress() { | |
| fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master | |
| patch -p1 < rvm-patchsets/patches/ruby/2.2.3/railsexpress/01-zero-broken-tests.patch | |
| patch -p1 < rvm-patchsets/patches/ruby/2.2.3/railsexpress/02-improve-gc-stats.patch | |
| patch -p1 < rvm-patchsets/patches/ruby/2.2.3/railsexpress/03-display-more-detailed-stack-trace.patch |
| build_package_reconfigure() { | |
| test -f configure || autoconf | |
| } | |
| build_package_patch_ruby_railsexpress() { | |
| fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master | |
| patch -p1 < rvm-patchsets/patches/ruby/2.1.6/railsexpress/01-zero-broken-tests.patch | |
| patch -p1 < rvm-patchsets/patches/ruby/2.1.6/railsexpress/02-improve-gc-stats.patch | |
| patch -p1 < rvm-patchsets/patches/ruby/2.1.6/railsexpress/03-display-more-detailed-stack-trace.patch |
| build_package_reconfigure() { | |
| test -f configure || autoconf | |
| } | |
| build_package_patch_ruby_railsexpress() { | |
| fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master | |
| patch -p1 < rvm-patchsets/patches/ruby/2.1.5/railsexpress/01-zero-broken-tests.patch | |
| patch -p1 < rvm-patchsets/patches/ruby/2.1.5/railsexpress/02-improve-gc-stats.patch | |
| patch -p1 < rvm-patchsets/patches/ruby/2.1.5/railsexpress/03-display-more-detailed-stack-trace.patch |