Skip to content

Instantly share code, notes, and snippets.

View uchida's full-sized avatar

Akihiro Uchida uchida

View GitHub Profile
@uchida
uchida / keybase.md
Created July 2, 2016 04:32
keybase.md

Keybase proof

I hereby claim:

  • I am uchida on github.
  • I am uchida (https://keybase.io/uchida) on keybase.
  • I have a public key whose fingerprint is 0B52 06F3 41EE ED89 6021 7423 FDE3 1684 6BF3 F057

To claim this, I am signing this object:

@uchida
uchida / private.xml
Created July 1, 2016 19:46
karabiner private.xml to remap cmd/opt/app key for MS keyborad
<?xml version="1.0"?>
<root>
<item>
<name>private items for MS Keyboard</name>
<item>
<name>Option_L to Command_L for MS Keyboard</name>
<identifier>private.micorosoft.opt_l-to-cmd-l</identifier>
<device_only>DeviceVendor::MICROSOFT</device_only>
<autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
</item>
@uchida
uchida / main.go
Created June 30, 2016 16:06
date sieve
package main
import (
"fmt"
"errors"
"log"
"os"
"time"
"strings"
"path/filepath"
#!/bin/sh
docker ps -q -f status=exited | xargs --no-run-if-empty docker rm
docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi
@uchida
uchida / arxiv2bib.py
Last active March 22, 2024 11:19
a simple BibTeX file generator from arxiv.org URL
#!/usr/bin/python
# -*- coding: utf-8 -*-
# CC0, dedicated to public domain by Akihiro Uchida
import argparse
import urllib2, os
from HTMLParser import HTMLParser
import re
import calendar
ARXIV_ID_RE = re.compile(r'arXiv:((\d\d)(\d\d)\.\d+)')
@uchida
uchida / bibparse.py
Created January 31, 2016 00:18
a simple BibTeX parser based on finite state machine
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# CC0 dedicated to public domai by Akihiro Uchida
import sys
class BibParser(object):
def __init__(self):
self.parse = self.parse_main
self.buffer = ''
self.item = dict()
@uchida
uchida / CC0_CLA.md
Last active January 5, 2019 20:19
CLA for CC0

Copyright Statement for Contributions

I hereby represent that all present, past and future contributions are governed by the Creative Commons Zero 1.0 Universal copyright statement, placing my contributions in the publicdomain. This entails that to the extent possible under law I waive all copyright and related or neighboring rights to the code or documents I contribute. I also represent that I have the authority to perform the above waiver with respect to the entirety of my contributions.

(defn access [array & idxs]
(loop [i (first idxs)
idxs (rest idxs)
ret array]
(if i
(recur (first idxs) (rest idxs) (get ret i))
ret)))
(access [[0 1 2]] 0 1)
// ========================== KeySnail Init File =========================== //
// この領域は, GUI により設定ファイルを生成した際にも引き継がれます
// 特殊キー, キーバインド定義, フック, ブラックリスト以外のコードは, この中に書くようにして下さい
// ========================================================================= //
//{{%PRESERVE%
plugins.options["ldrnail.keybind"] = {
'j': 'next',
'k': 'prev',
'p': 'pin',
@uchida
uchida / README.md
Last active August 29, 2015 13:56
メール送信コマンド (python 2.6 以上で動作)

使い方

設定名は後述する設定ファイルで設定します。

$ /path/to/mail.py '設定名' '宛先アドレス' '題名' '本文'

設定