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 / surfingkeys_config.js
Last active November 20, 2023 03:14
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
@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 / test_APA.R
Last active April 3, 2023 01:33
alternative polyadenylation (APA)
source("./utils_APA.R")
## How ot use?
##
## Change the path of tsv and gtf file
## `chr_name` is the column name of chromosome in the tsv file, default is "Chromosome"
## `pos_name` is the column name of position in the tsv file, default is "End"
## `strand_name` is the column name of strand in the tsv file, default is "Strand"
tsv <- "./test_sites.tsv"
" Automatically generated packer.nvim plugin loader code
if !has('nvim-0.5')
echohl WarningMsg
echom "Invalid Neovim version for packer.nvim!"
echohl None
finish
endif
packadd packer.nvim
@y9c
y9c / quasiquotation_metaprogramming.R
Created April 7, 2020 07:02
Quasiquotation of R is terrible.
#!/usr/bin/env Rscript
# -*- coding: utf-8 -*-
#
# Copyright © 2020 Ye Chang <yech1990@gmail.com>
# Distributed under terms of the MIT license.
#
# Created: 2020-04-07 14:27
f <- function(x) {
@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
]);
}
@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 / 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.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;
});
});

检查ipv4转发开启

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

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

安装cdns解决dns污染