Skip to content

Instantly share code, notes, and snippets.

@ryanzyy
ryanzyy / .vimrc
Last active March 27, 2020 10:06
vimrc
" ------ Plug ----- {{{
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive' " IDE - Git
Plug 'ludovicchabant/vim-gutentags' " IDE - Ctags
Plug 'dracula/vim', {'as': 'dracula'} " IDE - Color
Plug 'junegunn/fzf' " IDE - Directory
Plug 'junegunn/fzf.vim' " IDE - Directory
Plug 'scrooloose/nerdtree' " IDE - Directory
Plug 'mileszs/ack.vim' " IDE - Find
@ryanzyy
ryanzyy / conemu64-context-menu.bat
Last active August 29, 2015 14:00
Open Folder with ConEmu in Windows Context Menu
@echo off
SET conEmuPath=C:\Program Files\ConEmu\ConEmu64.exe
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with ConEmu64" /t REG_SZ /v "" /d "Open with ConEmu64" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with ConEmu64" /t REG_EXPAND_SZ /v "Icon" /d "%conEmuPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with ConEmu64\command" /t REG_SZ /v "" /d "%conEmuPath% /dir \"%%1\"" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with ConEmu64" /t REG_SZ /v "" /d "Open with ConEmu64" /f
@ryanzyy
ryanzyy / Windows Putty Monokai 16-Color Settings
Last active August 29, 2015 14:03
Windows Putty Monokai 16-Color Settings
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\my-session-name]
"Colour0"="165,159,133"
"Colour1"="248,248,242"
"Colour2"="39,40,34"
"Colour3"="56,56,48"
"Colour4"="39,40,34"
"Colour5"="245,244,241"
"Colour6"="39,40,34"
@ryanzyy
ryanzyy / .tmux.conf
Last active October 17, 2018 15:02
Tmux Config
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
ryanzyy / find_puts
Created February 10, 2015 00:21
find_all_puts_not_in_comment
# need ack
ack --ruby '^\s{0,}.*\sputs.*$' | sed -E 's/^(.*:\s*#.*$)//g'
@ryanzyy
ryanzyy / vbox_port.rb
Created February 10, 2015 10:04
vbox port forwarding
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}"`
end
#delete:
# `"#{vbox_manger}" modifyvm "local-ubuntu" --natpf1 delete "port #{p}"
Sketchup.send_action('showRubyPanel:')
$m = Sketchup.active_model
$s = Sketchup.active_model.selection
$v = Sketchup.active_model.active_view
$c = Sketchup.active_model.active_view.camera
def dcross(*a)
opt = a.last.is_a?(Hash) ? a.pop : {}
new_group = $m.entities.add_group
@ryanzyy
ryanzyy / prime.js
Created March 9, 2017 08:10
Get Prime Numbers using JavaScript Generator [ECMAScript]
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 = gen.next().value;
yield head;
yield* prime(genFilter(gen, (x) => x % head !== 0));
rd %temp% /s /q
md %temp%

Configure msys2

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

Clone VIM

git clone https://github.com/vim/vim --depth=1

Modify src\Make_ming.mak

OLE=yes
GUI=yes