Skip to content

Instantly share code, notes, and snippets.

View hryk's full-sized avatar
🏠
Working from home

Hiroyuki Nakamura hryk

🏠
Working from home
View GitHub Profile

splitmbox.pl

2012-05-17T17:58:30

google-email-uploader-mac を使ってThunderbirdのInboxをアップロードしようとしたら、mboxが大きすぎてうまくいかなかったから作った。 Mail::Box::Managerはmbox開く時にロックしたりしていて、特に大きいmboxを開くとものすごく時間がかかるけど一応うまく動いた。

set nocompatible
filetype off " for Vundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
" github repos
@hryk
hryk / isoelectric_point.js
Created April 19, 2012 12:52
Calculating Isoelectric point of protein sequences.
_ = require('underscore');
EE = require('events').EventEmitter;
ee = new EE();
isoelectric = {};
(function(){
// Constants
var type_p = ['H', 'R', 'K'];
// pk from Bjellqvist, et al.
// Taking into account the decrease in pK differences
// between acids and bases when going from water
@hryk
hryk / auto_validation.rb
Created April 14, 2012 11:28
example code for dm-validations
#!/usr/bin/env ruby
require 'rubygems'
require 'dm-core'
require 'dm-validations'
require 'dm-transactions'
require 'dm-migrations'
require 'dm-types'
class Card
@hryk
hryk / qmailinit.sh
Created January 17, 2012 17:52
/etc/init.d/qmail
#!/bin/bash
#
# Init file for qmail.
#
# chkconfig: - 99 02
# description: qmail. SMTP server
#
# processname: qmail-smtpd
# pidfile: /var/run/qmail
@hryk
hryk / notification.plugin.zsh
Last active December 1, 2016 09:38
notification plugin for oh-my-zsh.
# oh-my-zsh! notification plugin
#
# DESCRIPTION
#
# INSTALL
#
# Place this file to $HOME/.oh-my-zsh/plugins/notification/notification.plugin.zsh
#
# USAGE
#
#!/usr/bin/env ruby
#
# svnの$Date$っぽくコミットした時に$Date$に編集した時間を入れる
#
# stageされているファイルを探す
files = `git diff --name-only --cached`
# 日付入れる
// ==UserScript==
// @match http://*/*
// ==/UserScript==
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
// ==UserScript==
// @match http://*/*
// ==/UserScript==
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");