Skip to content

Instantly share code, notes, and snippets.

@for2ando
for2ando / chromeKeyBinderScript
Created March 19, 2019 10:26
my keyboard assignment script for a lost ancient Chrome Extension named as 'KeyBinder'.
set c-q
ubind bsic <c-q>
bind bsich <c-q> [mode.change n]
bind bsich <f10> [mode.change p]
set c-w
#ubind b <c-w>
#ubind sichno <c-w>
#bind bsichno <c-w> [nop]
#bind bs <c-w> [selection.kill]
// ========================== KeySnail Init File =========================== //
// この領域は, GUI により設定ファイルを生成した際にも引き継がれます
// 特殊キー, キーバインド定義, フック, ブラックリスト以外のコードは, この中に書くようにして下さい
// ========================================================================= //
//{{%PRESERVE%
// ここにコードを入力して下さい
//}}%PRESERVE%
// ========================================================================= //
@for2ando
for2ando / README_md_template
Created June 11, 2019 10:15
My template for README.md on github.
Name
====
Overview
## Description
## Demo
## VS.
@for2ando
for2ando / sudo
Created July 25, 2020 11:27
a simple sudo command for Windows with Cygwin.
#!/bin/sh
pname=$(basename "$0")
usage="$pname [-c|--console] Command [Argument ...]
$pname {-h|--help)
FEATURES
execute Command with Argument(s) on Windows's 'elevated' state.
OPTIONS
-c, --console
open another window and print the output of the elevated Command there.
@for2ando
for2ando / nbn2ip
Last active October 16, 2022 13:49
converting a NetBeui Name to the binded IP address on NetBeui on TCP/IP platform; for Cygwin.
#!/bin/bash
export LANG=ja_JP.UTF-8
pname=$(basename "$0")
usage="$pname NBName
$pname {-h|--help}
FEATURES
OPTIONS
"
@for2ando
for2ando / karabiner.json
Last active July 5, 2021 15:25
A configuration file of the keyboard assigns configurator 'Karabiner-Element' for MacOS
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@for2ando
for2ando / git_tree_alias.txt
Created October 12, 2020 13:39
Put it on ~/.gitconfig, so that you can use the pretty 'git tree' command ! (from https://qiita.com/hirotsugu_kawa/items/41afaafe477b877b5b73 )
[alias]
tree = log --graph --pretty=format:'%x09%C(auto) %h %Cgreen %ar %Creset%x09by"%C(cyan ul)%an%Creset" %x09%C(auto)%s %d'
@for2ando
for2ando / bsd_like_install
Last active October 16, 2022 13:10
A wrapper for non-BSD install command to behave as a BSD's install command when using -v option.
#!/bin/bash
## Let non-BSD install command to behave as a BSD's install command
## when using -v option.
verbosep=false
case "$1" in
-*v*) verbosep=true;;
esac
$verbosep && {
@for2ando
for2ando / pageless
Last active October 16, 2022 13:11
output files using $PAGER if the number of lines is grater or equal than $LINES, or output using cat.
#!/bin/bash
pname=$(basename "$0")
while true; do
case "$1" in
-l) lines="$2"; shift 2;;
-*) echo "$pname: '$1': no such option.">&2; shift;;
*) break;;
esac
done
@for2ando
for2ando / makeshortcut.bat
Last active January 7, 2022 11:26
A one-file script to make a Windows's shortcut from https://qiita.com/y-takano/items/b94312abc17159dce8be . Thanks to @y-takano.
@if(0)==(0) echo off
cscript.exe //nologo //E:JScript "%~f0" %*
goto :EOF
@end
// メイン処理
function main() {
var shortcut = null;
try {
// ショートカットを作成する