Skip to content

Instantly share code, notes, and snippets.

@kenoss
kenoss / my-tex-imenu.el
Created July 13, 2013 20:35
TeXで階層imenu(適当)
; -*- coding: utf-8 -*-
;;; my-tex-imenu.el ---
;;; Commentary:
;;
;;; Code:
from typing import Protocol
class Ring(Protocol):
@staticmethod
def zero() -> "Ring":
...
@staticmethod
def identity() -> "Ring":
...
@kenoss
kenoss / hoge.md
Last active August 10, 2021 08:25
A poet on exception in python

元々の話題: python 初学者にオススメできる例外についての知見あれば

@kenoss
kenoss / README.md
Created February 7, 2020 13:23
How to pair bluetooth devices on linux
$ bluetoothctl
# scan on
...
[NEW] Device <...> HHKB-Hybrid_1
...
# scan off
# pair <...>
# connect <...>
# exit
@kenoss
kenoss / example_tasks.py
Created August 5, 2019 09:05
Python invoke: Add --exec option and make tasks dryable.
import invoke
import invoke_dryable as dryable
@invoke.task
@dryable.default_dryrun
def build(c, clean=False):
if clean:
print("Cleaning!")
@kenoss
kenoss / find-job.md
Created April 30, 2019 14:36
find-job.md

お仕事募集中です.

Last update: 2019-04-30

あなたは誰?

@kenoss
kenoss / readme.md
Created December 10, 2018 16:03
`pip install google-cloud-strage` failed

c.f.

pypa/setuptools#885 (comment)

error

$ pip install google-cloud-storage
Collecting google-cloud-storage
  Downloading https://files.pythonhosted.org/packages/d7/62/a2e3111bf4d1eb54fe86dec694418644e024eb059bf1e66ebdcf9f98ad70/google_cloud_storage-1.13.0-py2.py3-none-any.whl (59kB)
@kenoss
kenoss / client.rs
Last active May 5, 2018 17:34
Working example of unix domain socket in Rust (rustc 1.26.0-beta.18); c.f. http://www.cs.brandeis.edu/~cs146a/rust/rustbyexample-02-21-2015/sockets.html
// client.rs
use std::env;
use std::io::Write;
use std::os::unix::net::UnixStream;
use std::path::Path;
use common::SOCKET_PATH;
mod common;
@kenoss
kenoss / init-whitespace.el
Created August 9, 2015 07:49
My current whitespace config.
; -*- lexical-binding: t -*-
(require 'whitespace)
(require 'erfi-srfi-1)
(require 'my-init-aux)
;; see http://piyolian.blogspot.jp/2011/12/emacs-whitespace-like-jaspace.html
@kenoss
kenoss / trace-config.el
Created March 28, 2015 10:00
My trace command.
(defun trace-function-regexp (regexp &optional buffer)
(interactive
(list
(read-string "Trace function regexp: ")
(read-buffer "Output to buffer: " trace-buffer)))
(mapc 'trace-function (apropos-internal regexp 'fboundp)))
(defun trace-function-background-regexp (regexp &optional buffer)
(interactive
(list
(read-string "Trace function background regexp: ")