Skip to content

Instantly share code, notes, and snippets.

@y9c
y9c / try.md
Created December 29, 2015 06:23

hello

note

hello1

print("hello")

hello2

@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
@y9c
y9c / setting_for_vimium_user.jq
Created January 9, 2016 17:28
a user friendly setting for vimium user
//help
mapkey('?', 'Show usage', 'Normal.showUsage()');
//toggle
Events.hotKey = 'i'; // hotkey must be one keystroke with/without modifier, it can not be a sequence of keystrokes like `gg`.
// tab
mapkey('ZQ', 'Quit', function() {
RUNTIME('quit');
});
@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 / 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 / powerline_font.sh
Last active February 27, 2017 11:40
poweline font fix
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/
sudo fc-cache -vf
sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/
@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/

检查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 / init.vim
Last active March 22, 2018 06:04
"=============================================================================
" Configuration for SpaceVim ( URL: https://spacevim.org )
" Edited by yech
"=============================================================================
" SpaceVim Wraped Options: {{{
let g:spacevim_enable_debug = 1
let g:spacevim_realtime_leader_guide = 1
let g:spacevim_enable_tabline_filetype_icon = 1
@y9c
y9c / surfingkeys_config.js
Last active October 25, 2024 18:00
surfingkeys_config.js
/*************************************************************
* File Name : surfingkeys_config.js
* Created By : Ye Chang
* Creation Date : [2017-12-22 21:55]
* Last Modified : [2023-11-19 13:35]
* Description :
**************************************************************/
// -----------------------------------------------------------------------------------------------------------------------
// - Surfingkeys: https://github.com/brookhong/Surfingkeys#properties-list