Skip to content

Instantly share code, notes, and snippets.

@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 <[email protected]>
# 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 / 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
@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

检查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 / 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/