Skip to content

Instantly share code, notes, and snippets.

View sss's full-sized avatar

SASAKI Suguru sss

  • Kyoto, Japan
View GitHub Profile
@sss
sss / try-alternate-file-name-when-failed.patch
Created April 23, 2011 20:08
Try an alternate file name when failed to decode the final component of URI in Zotero 2.1.6
Zotero 2.1.6 is failing to capture a web page,
whose URI has the final component which can't be
decoded with decodeURIComponent().
(e.g. URI has the final component in non UTF-8 encoded string)
This patch is a workaround for this against /extension/branches/2.1 .
When failed to decode the final component with decodeURIComponent(),
try base64 of SHA-1 of the final component as an alternate file name.
---
@sss
sss / googl-for-earthquake.rb
Created April 29, 2011 22:41
Google URL Shortener for earthquake.gem
# Google URL Shortener for earthquake.gem
require 'googl'
Earthquake.init do
_ = config[:googl] ||= {}
_[:username] ||= ''
_[:password] ||= ''
_[:only_long_tweet] ||= false
@sss
sss / draft.rb
Created June 23, 2011 02:53 — forked from no6v/draft.rb
module Earthquake::Input
def drafts
@drafts ||= []
end
end
Earthquake.init do
d = drafts
subcommands = {
apply: ->(index){Readline::HISTORY.push(d.at(Integer(index)))},
@sss
sss / gist:1111195
Created July 28, 2011 08:20
HOWTO: Setup "Calendar and Contacts Server" behind Apache 2.2 with SSL
This HOWTO is about...
* You already installed Apache HTTPd 2.2 with SSL (mod_ssl or mod_gnutls)
* and want to setup "Calendar and Contacts Server" behind it
1. You can install "Calendar and Contacts Server"
(http://trac.calendarserver.org/) under Debian, as follows:
$ apt-get install calendarserver
@sss
sss / solarized-for-teraterm.ini
Created September 16, 2011 11:25
Solarized for TeraTerm
;
; Solarized [1] for TeraTerm [2]
;
; [1] <http://ethanschoonover.com/solarized>
; [2] <http://ttssh2.sourceforge.jp/>
;
; * Add this to your TERATERM.ini
; * ANSIColor setting is the same between Solarized Light and Dark,
; but you need to choose VTColor and VTReverseColor settings
; depending on your flavour (Light or Dark).
@sss
sss / executable-with-subcommands-using-thor.log
Created February 24, 2012 20:16
Revised: Namespacing thor commands in a standalone Ruby executable
$ ./executable-with-subcommands-using-thor.rb
Tasks:
executable-with-subcommands-using-thor.rb help [TASK] # Describe available tasks or one specific task
executable-with-subcommands-using-thor.rb subA [TASK] # Execute a task in namespace subA
executable-with-subcommands-using-thor.rb subB [TASK] # Execute a task in namespace subB
executable-with-subcommands-using-thor.rb test # test in CLI
$ ./executable-with-subcommands-using-thor.rb help
Tasks:
executable-with-subcommands-using-thor.rb help [TASK] # Describe available tasks or one specific task
@sss
sss / .git--config
Created June 17, 2012 18:11
Updating metadata for gitinfo (in TeX Live)
[hooks.tex.gitinfo]
prefix = .
prefix = ./test
prefix = ./docs