Skip to content

Instantly share code, notes, and snippets.

View zchee's full-sized avatar
😩
want to Go knowledge...

Koichi Shiraishi zchee

😩
want to Go knowledge...
View GitHub Profile
@zchee
zchee / iterm2-left-right-margin.diff
Last active September 14, 2015 02:20 — forked from saitoha/iterm2-left-right-margin.diff
Add DECLRMM(DECVSSM) and DECSLRM feature to iTerm2 (on progress)
diff --git a/VT100Screen.h b/VT100Screen.h
index d47185e..585d326 100644
--- a/VT100Screen.h
+++ b/VT100Screen.h
@@ -87,6 +87,8 @@ void TranslateCharacterSet(screen_char_t *s, int len);
int ALT_SAVE_CURSOR_Y;
int SCROLL_TOP;
int SCROLL_BOTTOM;
+ int SCROLL_LEFT;
+ int SCROLL_RIGHT;
@zchee
zchee / parallelrun.py
Last active August 27, 2015 17:39 — forked from mtorromeo/parallelrun.py
Parallelize shell processes enforcing a concurrency limit using python3 and asyncio
import asyncio
concurrency_sem = asyncio.Semaphore(3)
@asyncio.coroutine
def run(process):
yield from concurrency_sem.acquire()
print("Running {}...".format(process))
proc = yield from asyncio.create_subprocess_shell(process)
yield from proc.communicate()
@zchee
zchee / osx_kernel_debug_two_boxes.md
Last active August 27, 2015 12:20
Two-box osx kernel debugging

Two-box osx kernel development

This is an officially unsupported two-box setup, suitable for real kernel (and sometimes kext) development.

Target box setup w/ development kernel

Make sure the box has plenty, but not too much, ram, unless you enjoy wasting time doing either virtual or actual paging.

@zchee
zchee / SSHwithgit2go.go
Last active March 10, 2023 18:29 — forked from xorpaul/SSHwithgit2go.go
Working example with SSH and libgit2/git2go
package main
import (
git "github.com/libgit2/git2go"
"log"
)
func credentialsCallback(url string, username string, allowedTypes git.CredType) (git.ErrorCode, *git.Cred) {
ret, cred := git.NewCredSshKey("git", "/home/vagrant/.ssh/id_rsa.pub", "/home/vagrant/.ssh/id_rsa", "")
return git.ErrorCode(ret), &cred
@zchee
zchee / tmux.conf
Last active August 29, 2015 14:27 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@zchee
zchee / file1.markdown
Last active August 29, 2015 14:26 — forked from hetima/file1.markdown
How to transition from EasySIMBL to SIMBL

#How to transition from EasySIMBL to SIMBL

( ~ is your home directory )

  1. Launch EasySIMBL.app. Turn OFF Use SIMBL checkbox. Quit EasySIMBL.
  2. Remove ~/Library/ScriptingAdditions/EasySIMBL.osax if exists.
  3. SIMBL directory and EasySIMBL.osax located in ~/Library/Containers/ is not needed. Find from Finder or find command like find ~/Library/Containers -name "*SIMBL*" -ls and remove manually if exists.
  4. Restart Mac (just in case).
  5. Install SIMBL-0.9.9 (original SIMBL-0.9.9.pkg is not code signed. So open from context menu)
  6. Done.
#!/bin/sh
if [ "$1" = "open" ]; then
REPO=`git remote -v | grep origin | perl -nle '/github\.com:(\S*)\.git/ && print $1' | head -1`
open "https://travis-ci.org/$REPO"
exit
fi
rbenv exec travis "$@"
@zchee
zchee / kiklib-configure.patch
Last active August 29, 2015 14:25 — forked from anyakichi/kiklib-configure.patch
mlterm fix for Mac OS X
--- kiklib/configure.orig 2013-03-23 21:40:00.000000000 +0900
+++ kiklib/configure 2013-04-15 19:58:13.000000000 +0900
@@ -19839,7 +19839,7 @@
DL_LIBS="${DL_LIBS} ${lt_cv_dlopen_libs}"
# NSLinkModule (darwin)
ac_fn_c_check_func "$LINENO" "NSLinkModule" "ac_cv_func_NSLinkModule"
-if test "x$ac_cv_func_NSLinkModule" = x""yes; then :
+if test "$DL_LOADER" = none && test "x$ac_cv_func_NSLinkModule" = x""yes; then :
DL_LOADER=dyld
@zchee
zchee / rxvt-unicode.sh
Last active August 29, 2015 14:25 — forked from rcrowley/rxvt-unicode.sh
Mac rxvt-unicode setup.
# Mac rxvt-unicode setup.
# http://rcrowley.org/articles/rxvt-unicode.html
# Install dependencies from MacPorts and CPAN.
sudo port install rxvt-unicode +xterm_colors_256
sudo port install terminus-font
sudo cpan install Mac::Pasteboard
# Run urxvt at X11 startup.
defaults write org.x.X11 app_to_run /opt/local/bin/urxvt
@zchee
zchee / .README.md
Last active August 17, 2021 11:38 — forked from tarruda/.README.md
Tmux/Vim integration

Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.

Features:

  • Transparently move between tmux panes and vim windows
  • Using the shell, open files in one vim instance per project or directory
  • Fully integrated copy/paste between tmux, vim and x11 using simple keybinds(need to install the xclip program)
  • Easily send text to any tmux pane without breaking your edit workflow(needs slimux

'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist