Skip to content

Instantly share code, notes, and snippets.

检查ipv4转发开启

vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p

DNS的解析方案为 resolve.conf ==> dnsmasq ==> cdns

安装cdns解决dns污染

@y9c
y9c / ubuntu-powerline-install.md
Last active July 23, 2017 12:13 — forked from petercossey/ubuntu-powerline-install.md
Powerline font install for Ubuntu 16.10

Get the font and config files

cd ~
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
sudo mv PowerlineSymbols.otf /usr/share/fonts/
@y9c
y9c / surfingkeys.js
Last active October 28, 2017 04:30 — forked from rynffoll/surfingkeys.js
Surfingkeys Config
// unmap some system key
unmap('<Ctrl-j>');
// mapping like vimum
map('u', 'e');
mapkey('p', "Open the clipboard's URL in the current tab", function() {
Front.getContentFromClipboard(function(response) {
window.location.href = response.data;
});
});
@y9c
y9c / latest_vim_and_ubuntu_with_all.sh
Last active May 29, 2017 11:07
Installing vim 8.0.X with lua 5.3, python on Ubuntu 16.04
# remove old vim
sudo apt purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
# install dependence
sudo apt install liblua5.1-dev luajit libluajit-5.1 \
python3-dev \
ruby-dev \
libperl-dev \
@y9c
y9c / 0_reuse_code.js
Created December 29, 2015 06:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console