Skip to content

Instantly share code, notes, and snippets.

@deton
deton / tsf-vim-vac2012.markdown
Last active April 20, 2024 03:40
Vi風操作をWindows用IMEとして実装
@hackerb9
hackerb9 / sixcat
Created June 3, 2017 03:36
sixcat: Like 'cat' but show images directly in the terminal using SIXEL graphics
#!/bin/bash
# sixcat: Use sixel graphics to show an image inside a terminal.
# sixgif: Use sixel graphics to play an animation inside a terminal.
# Version 1.0
# hackerb9, June 2017
# Sixel graphics are supported by terminals such as the DEC VT340 and
# emulators, such as 'xterm -ti vt340'.
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@puffnfresh
puffnfresh / CGSSpaces.h
Last active February 20, 2023 17:57
Header for undocumented Spaces APIs
#include <Carbon/Carbon.h>
typedef void *CGSConnectionID;
extern CGSConnectionID _CGSDefaultConnection(void);
#define CGSDefaultConnection _CGSDefaultConnection()
typedef uint64_t CGSSpace;
typedef enum _CGSSpaceType {
kCGSSpaceUser,
kCGSSpaceFullscreen,
@waltarix
waltarix / tmux-do-not-combine-utf8.patch
Last active May 29, 2022 09:58
tmux: Fix a problems with displaying Ambiguous-width, Japanese Dakuten and Handakuten signs.
diff --git a/screen-write.c b/screen-write.c
index 15f8d07..8a175a6 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1334,6 +1334,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
ctx->cells++;
/* If the width is zero, combine onto the previous character. */
+ /*
if (width == 0) {
@kennyj
kennyj / gist:4966002
Last active March 14, 2022 02:28
ハイフン付き電話番号に分割
# encoding: utf-8
module TelSplitter
MAP = {
# 市外局番 , 市内局番の桁数のマップ
# http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html のデータを利用
# 固定電話以外の桁数は適当です...
'050' => 4, # IP電話
'070' => 4, # 携帯電話/PHS
'080' => 4, # 携帯電話
@posaunehm
posaunehm / gist:4087971
Last active March 26, 2021 19:24
Why OO Sucks by Joe Armstrong
@knzm
knzm / gist:5185369
Last active December 30, 2020 14:34

Python パッケージングのこれまでとこれから

第1世代: distutils

$ python setup.py build
@olofsen
olofsen / rs.jl
Last active May 31, 2020 06:15
Reading, displaying, and converting a Sixel Graphics file with Julia
# The function ds() below reads a Sixel graphics file and creates an RGB Image,
# which can then be displayed and processed using the Image package.
# Public domain example code.
using Color, Images, ImageView
function vt340_palette()
pal = RGB[]
push!(pal, RGB(0.00, 0.00, 0.00))
push!(pal, RGB(0.20, 0.20, 0.80))
@dvdhrm
dvdhrm / tsm.h
Created September 19, 2012 11:28
TSM library as one file
/*
* TSM - Unicode Handling
*
* Copyright (c) 2011-2012 David Herrmann <dh.herrmann@googlemail.com>
* Copyright (c) 2011 University of Tuebingen
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,