This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'fileutils' | |
require 'yaml' | |
require 'time' | |
# for multi byte string | |
require 'stringed' | |
require 'nkf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>Command_L+Tab to Control_L+Tab (TERMINAL ONLY)</name> | |
<only>TERMINAL</only> | |
<identifier>private.remap.app_term_commandL_tab_2_to_controlL_tab_2</identifier> | |
<autogen>--KeyToKey-- | |
KeyCode::TAB, ModifierFlag::COMMAND_L, | |
KeyCode::TAB, ModifierFlag::CONTROL_L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title: A Liquid tag for Jekyll sites that allows embedding image file on | |
# Instagram. | |
# Authors: Nobuhiro Nikushi https://twitter.com/#!/niku4i | |
# Description: Easily embed image file on Instagram page. | |
# | |
# Syntax {% instag [class name(s)] http://instagr.am/p/IYYs5bo0jd/ [width [height]] [title text | "title text" ["alt text"]] %} | |
# | |
# Examples: | |
# {% instag http://instagr.am/p/IYYs5bo0jd/ %} | |
# {% instag left half http://instagr.am/p/IYYs5bo0jd/ my title %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Dump subtitle in text for TED | |
# | |
require 'json' | |
require 'open-uri' | |
base_url = 'http://www.ted.com/talks/subtitles' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'eventmachine' | |
get '/' do | |
stream :keep_open do |out| | |
interval = 1 | |
size = 1000 | |
EventMachine::PeriodicTimer.new(interval) { out << "#{gen_data(size)}\n" } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set logfile "path/to/log" | |
defaults | |
protocol POP3 | |
uidl | |
# fetchall | |
keep | |
no mimedecode | |
mda "/usr/local/bin/maildrop" | |
poll mail.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOME="/home/nikushi" | |
MAILDIR="$HOME/Maildir" | |
DEFAULT="$MAILDIR/" | |
CONF="$HOME/etc/maildrop" | |
logfile "$HOME/log/maildrop.log" | |
### turn on when debug ### | |
#VERBOSE=5 | |
ME="[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOME="/home/nikushi" | |
ARCHIVEBASE="$HOME/Maildir.Archives" | |
# parse Date: value | |
D=`egrep ^Date: | \ | |
sed -e 's/^Date: *//' | \ | |
perl -MDate::Parse -ne 'print Date::Parse::str2time("$_")' \ | |
| perl -ne '@t=localtime($_); printf("%d%02d%02d",@t[5]+1900,@t[4]+1,@t[3])'` | |
if ( "$D" eq "" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOME="/home/nikushi" | |
WWWBASE="$HOME/public_html/mail" | |
MLNAME="" | |
# is ML ? | |
if ( /^Subject:\s+\[(.+?)(:\s*[0-9]*|\s+[0-9]*|)\]\s+/ ) | |
{ | |
MLNAME=$MATCH1 | |
} | |
if ( $MLNAME eq "" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>Command_R to Control_L (TERMINAL ONLY)</name> | |
<only>TERMINAL</only> | |
<identifier>private.remap.app_term_commandR_2_to_controlL_2</identifier> | |
<autogen>--KeyToKey-- | |
KeyCode::COMMAND_R, | |
KeyCode::CONTROL_L |
OlderNewer