Skip to content

Instantly share code, notes, and snippets.

View yunlingz's full-sized avatar

Yunling Zhu yunlingz

View GitHub Profile
@yunlingz
yunlingz / lisp.rb
Created February 10, 2021 10:31 — forked from dahlia/lisp.rb
30 minutes Lisp in Ruby
# 30 minutes Lisp in Ruby
# Hong Minhee <http://dahlia.kr/>
#
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
#
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,
@yunlingz
yunlingz / coc-settings.json
Created August 17, 2020 16:36
coc-settings.json
{
"diagnostic.errorSign": "❯",
"diagnostic.warningSign": "❯",
"diagnostic.infoSign": "❯",
"diagnostic.hintSign": "❯",
// ---
"diagnostic.virtualText": true,
"diagnostic.virtualTextCurrentLineOnly": false,
"diagnostic.virtualTextPrefix": " ",
// ---
@yunlingz
yunlingz / airline_config.vim
Created August 9, 2020 18:53
airline config
" --- airline ---
let g:airline_extensions = ['tabline']
" ---------
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail'
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline#extensions#tabline#right_sep = ''
let g:airline#extensions#tabline#right_alt_sep = ''
let g:airline#extensions#tabline#buffer_idx_mode = 1
@yunlingz
yunlingz / init.vim
Created July 3, 2020 11:23
vim tab completion
" tab complete
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
-Xss2m
-Xms256m
-Xmx2000m
-XX:NewSize=128m
-XX:MaxNewSize=128m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
{
// --- vim settings ---
// "vim.disableExtension": false,
"vim.useSystemClipboard": true,
"vim.hlsearch": true,
"vim.insertModeKeyBindings": [
{
"before": [
"j",
"j"
@yunlingz
yunlingz / init.vim
Created May 22, 2020 08:32
set goyo width based on filetype
function! AutoGoyoWidth()
if exists('#goyo')
Goyo!
return
endif
" ---------
if index(['python'], &ft) >= 0
Goyo 95
elseif index(['rust'], &ft) >= 0
Goyo 105
@yunlingz
yunlingz / Cargo.toml
Last active May 14, 2020 07:40
rust dev setup for building speed and others
[profile.dev]
debug = false
[profile.release]
debug = false
[profile.test]
debug = false
[profile.bench]
@yunlingz
yunlingz / build_vim_on_mac.sh
Created January 28, 2020 13:20
Build vim from src on macOS
#!/bin/bash
# brew install gettext lua perl python (ruby)
./configure --prefix=$HOME/opt/vim \
--with-features=huge \
--enable-multibyte \
--enable-cscope \
--with-compiledby="chuling <[email protected]>" \
--enable-perlinterp \
@yunlingz
yunlingz / meson.build
Last active January 14, 2020 08:28
Using BLAS/LAPACK from Eigen
cpp = meson.get_compiler('cpp')
eigen = dependency('eigen3', version: '>=3.3')
# intel mkl
mklroot = get_option('mklroot')
mkl_pkgconfig_dir = '@0@/bin/pkgconfig'.format(mklroot)
mkl_target_name = 'mkl-static-lp64-seq'
mkl_cflags = run_command(
'pkg-config', '--define-variable=prefix=@0@'.format(mklroot), '--cflags', mkl_target_name,