Skip to content

Instantly share code, notes, and snippets.

View y9c's full-sized avatar
🥼
In the lab

Chang Y y9c

🥼
In the lab
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / color.py
Created January 19, 2019 08:52
some common config for seaborn ploting
sns.set(
context="paper",
style="ticks",
font_scale=1,
rc={
"xtick.labelsize": 16,
"ytick.labelsize": 16,
"axes.labelsize": 14,
"legend.fontsize": 16,
"lines.linewidth": 1.25,
@y9c
y9c / main.dart
Last active March 8, 2020 17:29
list comprehension by dart
void main() {
print([
if (2 > 1) 222 else 333,
if (2 > 3) 444,
for (int i in Iterable.generate(10)) if (i % 3 == 1) i,
for (int i in Iterable.generate(10, (x) => x + 100)) if (i % 2 == 0) i
]);
}