Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -eo pipefail
#
# Git invokes the following command with commit-data for code-signing.
#
# gpg --status-fd 2 -bsau {signing_key}
#
while getopts :u:-: OPT; do
@ichizok
ichizok / deno.patch
Last active August 1, 2024 14:53
for Solaris/illumos
diff --git a/.cargo/config.toml b/.cargo/config.toml
index f5b2f124b..6cd093e8e 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -23,6 +23,9 @@ rustflags = [
"link-args=-fuse-ld=lld -weak_framework Metal -weak_framework MetalPerformanceShaders -weak_framework QuartzCore -weak_framework CoreGraphics",
]
+[target.x86_64-unknown-illumos]
+rustflags = ["-C", "link-args=-latomic -lffi -lstdc++"]
@ichizok
ichizok / git-fzf
Last active November 16, 2022 18:33
#!/usr/bin/env bash
set -e
if ! command -v fzf &>/dev/null; then
echo >&2 '*** you need install fzf cmd ***'
exit 1
fi
export FZF_DEFAULT_OPTS='--exact --layout=reverse --info=inline'
" Microsoft Office viewer
if exists('g:loaded_office')
finish
endif
let g:loaded_office = 1
let s:cpo_save = &cpo
set cpo&vim
#!/bin/bash
set -e
work_dir=$(mktemp -d)
trap "rm -fr '${work_dir}'" EXIT
if [[ $1 = - ]]; then
build_log=${work_dir}/build.log
tee "${build_log}"
@ichizok
ichizok / build.log
Last active December 8, 2020 12:07
build vim on ubuntu 16.04 (i386)
who@ubuntu32:~/vim$ git log -1
commit 083966f671475ae1b67f746f0b3f5309a45dfd8f
Author: Bram Moolenaar <[email protected]>
Date: Tue Dec 8 11:29:40 2020 +0100
patch 8.2.2108: Vim9: no test to check for :let error
Problem: Vim9: no test to check for :let error.
Solution: Add a test. Rename tests from _let_ to _var_.
who@ubuntu32:~/vim$
@ichizok
ichizok / compiledb_macvim.sh
Last active February 18, 2022 03:42
Create compile_commands.json for MacVim
#!/bin/bash
set -e
work_dir=$(mktemp -d)
trap "rm -fr '${work_dir}'" EXIT
if [[ $1 = - ]]; then
build_log=${work_dir}/build.log
tee "${build_log}"
@ichizok
ichizok / snake2camel.vim
Created November 26, 2019 07:59
snake2camel
" Mutual conversion between snake-case and camel-case
if exists('g:loaded_snake2camel')
finish
endif
let g:loaded_snake2camel = 1
let s:cpo_save = &cpo
set cpo&vim
diff --git a/src/ex_getln.c b/src/ex_getln.c
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -27,6 +27,7 @@ struct cmdline_info
char_u *cmdbuff; /* pointer to command line buffer */
int cmdbufflen; /* length of cmdbuff */
int cmdlen; /* number of chars in command line */
+ int cmdprevlen; /* number of chars in command line */
int cmdpos; /* current cursor position */
int cmdspos; /* cursor column on screen */
@ichizok
ichizok / vim.build
Last active November 3, 2023 15:02
For building Vim on macOS
#!/usr/bin/env python3
import argparse
import fileinput
import multiprocessing
import os
import re
import shutil
import subprocess
import sys