moonscript.md

title: Moonscript Moonscript 语法特点类似python和coffescript 类的使用 定义一个类,作为模块输入也可以 module "WS",package.seeall require "lfs" class WS -- Constructor -- class variables: -- @dirs table holds array of files name to handle new: => @dirs = {} @source = "" @target = "" -- pwd -- print current working directory pwd:()=> pwd = lfs.currentdir! print(pwd) -- link -- making symbolic link,s as source file,t as target file link:(s,t)=> lfs.link s,t,1 mkdp:(path)=> lfs.mkdir path -- walk -- walk through a directory -- if is directory, continue searching the subdirectories and files -- getting attributes and show them walk:(path)=> for file in lfs.
Read more →

notion.md

Notion Tiling Mostly used Win+P up/down Win+Tab left/right Win+s split up-down Win+k s split left-right Win+, swith workspace Win+Enter Maximize " ============================================================================ " Netrw Directory Listing (netrw v152) " /root " Sorted by name " Sort sequence: [/]$,<core%(.\d+)=>,.h$,.c$,.cpp$,~=*$,,.o$,.obj$,.info$,.swp$,.bak$,~$ " Copy/Move Tgt: /root/Desktop/ (local) " Quick Help: :help -:go up dir D:delete R:rename s:sort-by x:special " ============================================================================== ../ ./ .adobe/ .android/ .atom/ .cache/ .config/ .cscope.vim/ .dbus/ .dock-formulas/ .emacs.d/ .fltk/ .gem/ .getmail/ .
Read more →

openresty.md

openresty luajit install pacman -S luajit this will install luajit into usr/bin and lib files into usr/lib/luajit-2.0/ lib and include cp /usr/lib/luajit-2.0/* /usr/lib/ nginx/conf/nginx.conf http { include mime.types; default_type application/octet-stream; sendfile on; lua_shared_dict config 1m; lua_package_path "conf/?.lua;;"; init_by_lua_file "conf/init.lua"; server { listen 80; server_name localhost; location /luaredis { content_by_lua_file "conf/content.lua"; } } } nginx/conf/init.lua local cjson = require "cjson" local config = ngx.shared.config local file = io.open("conf/config.json","r") local content = cjson.
Read more →

pointer.md

Read more →

proxys.md

title: “Proxy matters” 设置成功基本开发环境 nodejs express redis npm proxy npm config set registry http://registry.npmjs.vitecho.com npm config set proxy=http://127.0.0.1:3127 wgetrc http_proxy = http://10.0.2.2:3128/ ftp_proxy = http://10.0.2.2:3128/ use_proxy = on wait = 15 ##ubuntu下apt-get设置代理成功,原来只能用-o参数 apt-get install -o Acquire::http::proxy= ip地址端口 wget git代理,使用gitconfig文件,通过命令可以设置 git config --global http.proxy=10.0.2.2:3128 git config –global http.sslverify false 在gitconfig文件中 proxy = http://127.0.0.1:3127 ##gem代理,使用–http-proxy ip地址端口 gem install –http-proxy http://10.0.2.2:3128 $gem_name # ###在.gemrc中 --- :backtrace: false :bulk_threshold: 1000 :sources: - http://ruby.taobao.org :update_sources: true :verbose: true :http_proxy: - http://proxy.
Read more →