Skip to content

Instantly share code, notes, and snippets.

Avatar

吴建涛 leolord

View GitHub Profile
View Alpine Docker Demo
# 指定一些变量
ARG PROOT=/root/app
ARG APP_PORT=3000
# 指定底包
FROM alpine:latest
LABEL version="1.0"
LABEL description="node docker file based on alpine which is quite small."
LABEL maintainer="leolord(fortomorrow@163.com)"
@leolord
leolord / vim.sh
Last active Mar 29, 2021
Compiling vim on Ubuntu 18 with LUA-support
View vim.sh
# Remove previous installations
sudo apt-get remove vim vim-runtime vim-tiny vim-common
# Install dependencies
sudo apt-get install libncurses5-dev python-dev liblua5.3-dev lua5.3 python3-dev
# Fix liblua paths
# You have to compile luajit for yourself.
sudo ln -s /usr/include/lua5.3 /usr/include/lua
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.3.so /usr/local/lib/liblua.so
@leolord
leolord / install-tenda-u1-wireless-dirver(rtl181192eu-driver)
Last active Mar 14, 2021
Tenda U1 wireless driver do not support the latest(kernel version above 4.7) Ubuntu, because some apis changed.
View install-tenda-u1-wireless-dirver(rtl181192eu-driver)
#!/bin/bash
set -e
set -x
wget http://down.tenda.com.cn/uploadfile/U1/U1-Linux%20Drivers.zip
unzip "U1-Linux Drivers.zip"
cd "RTL8192EU_linux_v5.2.7_22739_COEX20170113-0046.20170615/driver"
rm *.tar.gz
View gist:b93334f9630a166b72284880a763abf1
set autohidecursor
set noautofocus
set smoothscroll
set nativelinkorder
let blacklists = ["*://feedly.com/*", "https://inbox.google.com/*", "*://review.byted.org/*"]
let mapleader = ","
let defaultengine = "bing"
@leolord
leolord / rating-mark
Created Feb 18, 2016
用字符打印评分
View rating-mark
/**
著作权归作者所有。
商业转载请联系作者获得授权,非商业转载请注明出处。
作者:郑航
链接:https://www.zhihu.com/question/37904806/answer/74109099
来源:知乎
**/
function getRating(rating) {
if(rating > 5 || rating < 0) throw new Error('数字不在范围内');