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
virtual_node_context = | |
nodes_map: new WeakMap | |
class StringNode | |
constructor: (@parent, @string)-> | |
@context =@parent .context | |
try_render: ( container )-> | |
el =$ '<div>' | |
el .append @string | |
@contents =el .contents() |
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
//deno run -A runner.js t.coffee | |
import * as cs from 'https://coffeescript.org/v2/browser-compiler-modern/coffeescript.js' | |
let f = async ()=>{ | |
const decoder = new TextDecoder('utf-8'); | |
var content = await Deno.readFile( Deno.args[0] ); | |
const source = decoder.decode(content); | |
let js = cs.compile( source ); | |
eval( js ); |
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
entity ={} | |
entity .prototype =entity | |
entity .base_create =( proto )-> #props? | |
res =Object .create proto | |
res .entity =entity | |
res | |
schema_prototype = | |
get_prototype: ->@_prototype | |
process: ( entity_schema )-> |
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
modules ={} | |
for id in 'fs path vm coffeescript' .split ' ' | |
modules[ id ] =require id | |
exports = | |
read: ( file )-> | |
unless file[ 0 ] =='/' | |
file =modules .path .join( __dirname, file ) | |
modules .fs .readFileSync file, 'utf8' | |
compile: ( coffee, file )-> |
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 'awesome_print' | |
require 'pathname' | |
require 'net/ssh' | |
require 'net/scp' | |
class SFile | |
attr_reader :sym, :base, :root, :path | |
def initialize( sync, parent, path_str ) | |
@root =parent ? parent .root : self | |
@sync =sync |
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 'awesome_print' | |
class Item | |
attr_reader :code, :name | |
def initialize( code, name ) | |
@code, @name = code, name | |
end | |
def to_s | |
"#{ @code } #{ @name }" | |
end | |
end |
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 'awesome_print' | |
require 'fileutils' | |
require 'time' | |
class Option | |
attr_reader :name, :underscore, :index | |
attr_accessor :named_value | |
def initialize( name =nil, underscore =false, index =false, to_sql =nil ) | |
@name, @underscore, @index, @to_sql =name, underscore, index, to_sql | |
@named_value =to_sql != nil |
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
#dumb perms string to int | |
def process_perm | |
r ='' | |
n =0 | |
n +=4 if @perms[ 1 ] =='r' | |
n +=2 if @perms[ 2 ] =='w' | |
n +=1 if @perms[ 3 ] =='x' | |
r +=n .to_s | |
n =0 | |
n +=4 if @perms[ 4 ] =='r' |
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. |