This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy from http://meta.wikimedia.org/wiki/List_of_Wikipedias | |
Anglo-Saxon (ang) | |
العربية (ar) | |
سنڌي (sd) | |
Azərbaycan (az) | |
Български (bg) | |
বাংলা (bn) | |
Català (ca) | |
Česky (cs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" camelCase / under_score / kekab-case 轉換 | |
function! s:case_tx_subs_camel(w) "{{{ | |
let w = substitute(a:w, '-', '_', 'g') | |
return substitute(w, '_\([a-z]\)', '\u\1', 'g') | |
endfunction "}}} | |
function! s:case_tx_subs_kekab(w) "{{{ | |
let w = s:case_tx_subs_snake(a:w) | |
return tr(w, '_', '-') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim configure file | |
" Author: bootleq <bootleq@gmail.com> | |
" Blog: bootleq.blogspot.com | |
" ============================================================================ | |
" 7.4.1154 jsonencode() jsondecode() v:true v:null v:none | |
" 8.1.1068 complete_info() | |
" 8.1.1071 screenstring() | |
" 8.1.1056 rubyeval() | |
" 8.1.0846 has() bsd, linux, ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO global: Vagrant version: 2.1.1 | |
INFO global: Ruby version: 2.4.4 | |
INFO global: RubyGems version: 2.6.14.1 | |
INFO global: VAGRANT_DETECTED_ARCH="32" | |
INFO global: VAGRANT_DETECTED_OS="cygwin" | |
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.1.1\\gems\\vagrant-2.1.1\\bin\\vagrant" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_LOG="debug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
predef: [ | |
// for MooTools Core 1.3. Excluded of standard global objects and Slick. | |
"$", "$$", "typeOf", "instanceOf", "$A", "$H", | |
"Core", "Event", "Browser", "Class", "Chain", "Events", "Options", | |
"Element", "Fx", "Request", "Cookie", "JSON", "Swiff", | |
// for MooTools More 1.3 | |
"More", "URI", "Hash", "Form", "OverText", "Drag", "Slider", "Sortables", "Assets", "Color", | |
"Group", "IframeShim", "HtmlTable", "Keyboard", "Mask", "Scroller", "Tips", "Spinner", "Locale", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AwesomePrint | |
# Make awesome_print aware of certain classes and format differently | |
module YourName | |
def self.included(base) | |
base.send :alias_method, :cast_without_your_name, :cast | |
base.send :alias_method, :cast, :cast_with_your_name | |
end | |
def cast_with_your_name(object, type) | |
cast = cast_without_your_name(object, type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(ActiveRecord::Base) | |
Pry::Commands.create_command 'db-exec' do | |
description 'Run SQL statement with ActiveRecord::Base.connection' | |
banner <<-BANNER | |
Usage: db-exec [ > OUTPUT ] STATEMENT | |
db-exec [ > OUTPUT ] < INPUT | |
db-exec < INPUT > OUTPUT | |
Examples: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> | |
<os:ShortName>Imagery</os:ShortName> | |
<os:Description>Image search superpowers</os:Description> | |
<os:InputEncoding>utf-8</os:InputEncoding> | |
<os:Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAABEElEQVR4nGNgoAr4+//P3/9/sEoxovEvfdhy+8uhD7+fMTAwyHDpGQoEibGrICtgQVN9+v0KOPfJt0tPvl36+/8PMyMLdg23vxxiYGBwFM2R5zZhYGDY86pPkl0LWTW6Bh5WkQ+/n+1/PYXhNVREkl0Lzc1MyBxDgSABVilMO3HaAPEfJHyuftxx+v0KHlYRNA3ooXTvy4nzH9ZBQomBgcFXqgFfKL36eWfzswZkkcOvZ+Hzw4vvNxgYGARYpRIUFoTK9DIwMHz4/ezVzzs4NSADbhZhtADA4iQJTg2G9wwffj9b8CABIiLAKoXmBxQbzn9YB1EE4cpw6QVIt+FyAgMDA8On3y93vuxiwJv4SAYAplFkpcAGHAAAAAAASUVORK5CYII=</os:Image> | |
<UpdateInterval>7</UpdateInterval> | |
<IconUpdateUrl>http://elzr.com/images/imagery/favicon.ico</IconUpdateUrl> | |
<SearchForm>http://elzr.com/imagery</SearchForm> | |
<os:Url type="text/html" method="GET" template="http://elzr.com/imagery"> | |
<os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set tabline=%!SetTabLine() | |
function! SetTabLine() | |
" NOTE: left/right padding of each tab was hard coded as 1 space. | |
" NOTE: require Vim 7.3 strwidth() to display fullwidth text correctly. | |
" settings | |
let tabMinWidth = 0 | |
let tabMaxWidth = 40 | |
let tabMinWidthResized = 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
type = ARGV.shift | |
# Support both ARGV (normal argument) and ARGF (tmux copy-pipe) | |
arg = ARGV.any? ? ARGV.join(' ') : ARGF.read | |
case type |
NewerOlder