Skip to content

Instantly share code, notes, and snippets.

View seikichi's full-sized avatar
💭
社畜

Seiichi KONDO seikichi

💭
社畜
View GitHub Profile
;;
;; An autohotkey script that provides emacs-like keybinding on Windows
;;
#InstallKeybdHook
#UseHook
; The following line is a contribution of NTEmacs wiki http://www49.atwiki.jp/ntemacs/pages/20.html
SetKeyDelay 0
; turns to be 1 when ctrl-x is pressed
@seikichi
seikichi / scratch.rs
Created April 21, 2019 15:02
ConPTY scratch
// ConPTY 手習い (with winapi-rs, vte)
//
// https://github.com/jwilm/alacritty/blob/master/src/tty/windows/conpty.rs
// https://github.com/chyyran/conmux/blob/master/src/conpty.rs
// https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
use std::fs::File;
use std::io::prelude::*;
use std::io::Write;
use std::mem;
@seikichi
seikichi / cloudSettings
Last active March 10, 2022 08:40
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-12-01T13:33:49.180Z","extensionVersion":"v3.4.3"}
@seikichi
seikichi / feedly-star-opener.user.js
Last active August 29, 2015 14:07
Feedly Star Opener (2014/10/13 Firefox 32.0.3 Greasemonkey 2.2)
// ==UserScript==
// @name Feedly Star Opener
// @namespace http://www.srcw.net/
// @description Open saved items in Feedly
// @include http://feedly.com/*
// @include https://feedly.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @version 1.0.2
// ==/UserScript==
@seikichi
seikichi / fiddle.css
Last active December 28, 2015 21:39
jsfiddle test
body {}
@seikichi
seikichi / title.py
Last active December 19, 2015 09:09
#!/usr/bin/python
# -*- coding: utf-8 -*-
# http://futaba.qs.cjb.net/nijiran/fCatalog_MAY.html のタイトル取得が
# うまく出来んと言われたのでやってみた (なげやり)
# lxml は charset 適当に見つけたら上手いこと decode してくれるので
# response.text じゃなくて response.content を lxml.html.fromstring に
# 渡せばいいよとかそんな話
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Example: python3 kasi_time.py 65532
import sys
from selenium import webdriver
if len(sys.argv) != 2:
print('Usage: kasi_time.py id', file=sys.stderr)
#ifndef LUAHELPER_HPP
#define LUAHELPER_HPP
#include <iostream>
#include <memory>
#include <string>
#include <tuple>
#include <lua.hpp>
@seikichi
seikichi / kakan.cpp
Created May 9, 2011 03:38
サークルの講座用(2011/5/9)
/*
サークルの講座用に書いた何か.
`もう/もう 何/なに も/も 怖/コワ く/く な/な い/い 。/。`
という形式のコーパスを読み込んで仮名漢字変換っぽい何かをします.
未知語とか何も考えてない上にスムージングのパラメータも適当でこれはひどい.
「EUCだから1文字2バイトだろ」とか決め打ちでこれはひどい.
全体的に富豪気味でこれはひどい.
using namepsace std; もぐもぐ!
@seikichi
seikichi / isbn2title.py
Created March 1, 2011 19:46
ISBNをAmazon APIに投げて自炊した本のタイトル向けの文字列を出力
#!/usr/bin/python
# -*- coding: utf-8 -*-
# http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/
from sys import argv
from time import gmtime, strftime
from urllib import urlencode, urlopen
from xml.etree import ElementTree as ET
from base64 import b64encode