Skip to content

Instantly share code, notes, and snippets.

@knzm
knzm / gist:5185369
Last active December 30, 2020 14:34

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

第1世代: distutils

$ python setup.py build
@kennyj
kennyj / gist:4966002
Last active November 28, 2024 18:15
ハイフン付き電話番号に分割
# 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, # 携帯電話
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

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

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

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@yoshikaw
yoshikaw / option.c
Created December 5, 2012 21:36
vim73/src/option.c
/*
* Return "dark" or "light" depending on the kind of terminal.
* This is just guessing! Recognized are:
* "linux" Linux console
* "screen.linux" Linux console with screen
* "cygwin" Cygwin shell
* "putty" Putty program
* We also check the COLORFGBG environment variable, which is set by
* rxvt and derivatives. This variable contains either two or three
* values separated by semicolons; we want the last value in either
anonymous
anonymous / b-script.markdown
Created November 30, 2012 16:39
コルネット.蒸気に消えたスクリプト処理系

古くからの超漢字ユーザなら記憶の片隅にあるかもしれないスクリプト処理系「コルネット」. 業態を変えて今も活動している(って,知っていました?),株式会社セネットが開発を進めていました. 「コルネット」は,パイロットテスト版が一部ユーザにリリースされたものの,残念ながら,陽の目をみることなく消えてしまいました.

10年の時を経て,開発に関わっていた私自身,仕様の詳細は忘れかけています. 超漢字 advent calendar という機会を得て,記録を残す意味で,どんなものだったのかをざっくりと纏めてみたいと思います.

着想

BTRONの基本的な考え方に「データが重要である」というものがあります.

@posaunehm
posaunehm / gist:4087971
Last active March 26, 2021 19:24
Why OO Sucks by Joe Armstrong
@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,
@florianleibert
florianleibert / retry.bash
Created November 2, 2012 08:40
Retry logic in bash (for ssh / scp)
#!/bin/bash
set -o nounset
set -o errexit
set -o pipefail
declare -r max=4
declare i=0
function wrap() {
local cmd=$1 ; shift
@zonuexe
zonuexe / 101.rb
Created October 16, 2012 07:51
101
# -*- coding: utf-8 -*-
#
# author: USAMI Kenta <[email protected]>
# license: NYSL 0.9982
#
puts %w(
字佐美健太
-忠吉さん,_tadsan
--Zonu.EXE
@dvdhrm
dvdhrm / tsm.h
Created September 19, 2012 11:28
TSM library as one file
/*
* TSM - Unicode Handling
*
* Copyright (c) 2011-2012 David Herrmann <[email protected]>
* 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,