Skip to content

Instantly share code, notes, and snippets.

ryanzyy / config
Last active Apr 1, 2020
i3 config
View config
set $super Mod4
set $alt Mod1
# composite manager
exec --no-startup-id picom -b
# set font
font pango: Noto Sans 8
# Use Mouse+$super to drag floating windows to their wanted position
View .zshrc
export EDITOR='nvim'
export ZSH=$HOME/.oh-my-zsh
plugins=(git gitignore systemd)
source $ZSH/
bindkey -v
bindkey ^O vi-cmd-mode

Configure msys2

pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake

Clone VIM

git clone --depth=1

Modify src\Make_ming.mak

ryanzyy / prime.js
Created Mar 9, 2017
Get Prime Numbers using JavaScript Generator [ECMAScript]
View prime.js
function* from(i) { while (true) { yield i; i++; } }
function* genFilter(gen, cond) {
for (let e of gen) { if (cond(e)) yield e; }
function* prime(gen) {
let head =;
yield head;
yield* prime(genFilter(gen, (x) => x % head !== 0));
View sketchup-sugar.rb
$m = Sketchup.active_model
$s = Sketchup.active_model.selection
$v = Sketchup.active_model.active_view
$c =
def dcross(*a)
opt = a.last.is_a?(Hash) ? a.pop : {}
new_group = $m.entities.add_group
ryanzyy / vbox_port.rb
Created Feb 10, 2015
vbox port forwarding
View vbox_port.rb
vbox_manger = 'C:\Program Files\Oracle\VirtualBox\VBoxManage.exe'
(8000..8100).each do |p|
`"#{vbox_manger}" modifyvm "local-ubuntu" --natpf1 "port #{p},tcp,,#{p},,#{p}"`
# `"#{vbox_manger}" modifyvm "local-ubuntu" --natpf1 delete "port #{p}"
ryanzyy / find_puts
Created Feb 10, 2015
View find_puts
# need ack
ack --ruby '^\s{0,}.*\sputs.*$' | sed -E 's/^(.*:\s*#.*$)//g'
ryanzyy / .tmux.conf
Last active Oct 17, 2018
Tmux Config
View .tmux.conf
set -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
set -g default-terminal 'tmux-256color'
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
ryanzyy / Windows Putty Monokai 16-Color Settings
Last active Aug 29, 2015
Windows Putty Monokai 16-Color Settings
View Windows Putty Monokai 16-Color Settings
Windows Registry Editor Version 5.00