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
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index dacbd51..69b7b04 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -66,8 +66,8 @@ Zsh/mod_sched.yo Zsh/mod_socket.yo \
Zsh/mod_stat.yo Zsh/mod_system.yo Zsh/mod_tcp.yo \
Zsh/mod_termcap.yo Zsh/mod_terminfo.yo \
Zsh/mod_zftp.yo Zsh/mod_zle.yo Zsh/mod_zleparameter.yo \
-Zsh/mod_zprof.yo Zsh/mod_zpty.yo Zsh/mod_zselect.yo \
-Zsh/mod_zutil.yo
@elentok
elentok / profiling.zsh
Created October 10, 2013 20:34
Profiling zshrc (to find slow scripts)
typeset -F SECONDS=0
export START_TIME=$SECONDS
if [ -e ~/.profiling ]; then
echo "zshrc started"
source() {
local before=$SECONDS
. $*
local duration=$((($SECONDS - $before) * 1000))
@anyakichi
anyakichi / kiklib-configure.patch
Created December 9, 2013 13:31
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
#include <iostream>
void setBackground(unsigned r, unsigned g, unsigned b)
{
std::cout << "\x1b[48;2;" << r << ';' << g << ';' << b << 'm';
}
int main()
{
int point[4][3] = { {255,0,0},
@xorpaul
xorpaul / SSHwithgit2go.go
Created July 27, 2015 12:57
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
function vid2Gif {
if [[ $# != 3 ]]; then
print "too many or too less arguments"
return
fi
ffmpeg -y -i $1.mov -vf fps=10,scale=${2}:${3}:flags=lanczos,palettegen palette_$1.png
ffmpeg -i $1.mov -i palette_$1.png -filter_complex "fps=10,scale=${2}:${3}:flags=lanczos[x];[x][1:v]paletteuse" -f gif - | gifsicle --optimize=3 > $1.gif
}
diff --git a/src/edit.c b/src/edit.c
index abe26fb..b1536fc 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2826,7 +2826,6 @@ ins_compl_upd_pum(void)
if (compl_match_array != NULL)
{
h = curwin->w_cline_height;
- update_screen(0);
if (h != curwin->w_cline_height)
diff -r 8c8cdda36022 src/popupmnu.c
--- a/src/popupmnu.c Wed Aug 14 14:18:41 2013 +0200
+++ b/src/popupmnu.c Thu Aug 15 22:06:10 2013 +0900
@@ -639,7 +639,7 @@
{
/* Return cursor to where we were */
validate_cursor();
- redraw_later(SOME_VALID);
+ redraw_win_later(curwin, REDRAW_TOP);
@FiloSottile
FiloSottile / README.md
Last active July 20, 2016 20:15
Homebrew Formula for musl-based GCC cross-compilers.
@bells17
bells17 / my_sublime_text_2_preferences.json
Last active August 25, 2016 05:09
個人用に作成したSublime Text 2 の設定ファイルです。
{
/*
* UI関係
*/
// カラー&スキーマ
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", // カラー
"theme": "Soda Dark.sublime-theme", // スキーマ
// カーソルのスタイル ("smooth", "phase", "blink", "wide", "solid")
"caret_style": "smooth",