Skip to content

Instantly share code, notes, and snippets.

View leolord's full-sized avatar

吴建涛 leolord

View GitHub Profile
@leolord
leolord / install-tenda-u1-wireless-dirver(rtl181192eu-driver)
Last active October 8, 2021 16:36
Tenda U1 wireless driver do not support the latest(kernel version above 4.7) Ubuntu, because some apis changed.
#!/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
@leolord
leolord / vim.sh
Last active August 4, 2021 19:45
Compiling vim on Ubuntu 18 with LUA-support
# 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
# 指定一些变量
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)"
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 February 18, 2016 02:26
用字符打印评分
/**
著作权归作者所有。
商业转载请联系作者获得授权,非商业转载请注明出处。
作者:郑航
链接:https://www.zhihu.com/question/37904806/answer/74109099
来源:知乎
**/
function getRating(rating) {
if(rating > 5 || rating < 0) throw new Error('数字不在范围内');