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
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
cd ~/.rbenv && src/configure && make -C src | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec bash | |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash | |
mkdir -p "$(rbenv root)"/plugins | |
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build | |
rbenv install 2.6.4 | |
rbenv global 2.6.4 |
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
fs =require 'fs' | |
path =require 'path' | |
coffeelint =require 'coffeelint' | |
debug =console .log | |
file =process .argv[ 2 ] | |
content =fs .readFileSync file, 'utf8' | |
# $$ Inserts a "$". | |
# $& Inserts the matched substring. | |
# $` Inserts the portion of the string that precedes the matched substring. | |
# $' Inserts the portion of the string that follows the matched substring. |
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
exports .DbRequest =class DbRequest | |
constructor: ( @_sql, @_params =[] )-> | |
@_db =Database .instance | |
@_binded_db =@_db_handler .bind @ | |
@_promise =new Promise @_promise_hanlder .bind @ | |
_promise_hanlder: ( @_resolve, @_reject )-> | |
@_db .query @_sql, @_params, @_binded_db | |
_db_handler: (@_error, @rows, @fields )-> | |
@result =@rows | |
@_resolve @ |
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
require 'coffeescript/register' | |
http =require 'http' | |
utils =require './utils' | |
path_module =require 'path' | |
url_module =require 'url' | |
path_is_inside =require 'path-is-inside' | |
file_system =require 'fs' | |
mime =require 'mime-types' | |
debug =console .log |
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
class Expander | |
@_instance: null | |
constructor: -> | |
throw 'expander exists' if @constructor._instance | |
@constructor._instance =@ | |
@instance: -> | |
new @() unless @._instance | |
@._instance | |
_name: null |
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
class DragDrop | |
_container: null | |
_row: null | |
constructor: (@container ) -> | |
@_rows_array() | |
for row, i in @_rows | |
row .data 'index', i | |
selector ='.' +namespace.css_classes[ 'row' ] | |
selector +=' .' +namespace.css_classes[ 'handle' ] | |
@container.on 'mousedown', selector, @handler 'mouse_down' |
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
require 'erb' | |
class Script | |
@@erb | |
@@context | |
def self.init | |
create_template | |
create_context end | |
private | |
def self.create_template |
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
stylus test.styl -p | postcss --no-map | |
#stylus --use stylus-css-modules --with "{}" --use poststylus --with "['postcss-cssnext','lost',require('postcss-functions')({functions:{tf:function(a){return '=='+a;}}}), 'postcss-jsmath']" test.styl -o test.css |
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 | |
require "gtk3" | |
require 'pathname' | |
require 'awesome_print' | |
require 'listen' | |
class Out | |
def initialize args | |
create_window |
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 coffee | |
fs =require 'fs' | |
path =require 'path' | |
filename ='[stdin]' | |
object ={} | |
argv_length =process.argv.length | |
if argv_length <=2 or process.argv[ 2 ] =='-h' |