Skip to content

Instantly share code, notes, and snippets.

View dot's full-sized avatar
😇

Shuhei KONDO dot

😇
View GitHub Profile
@darashi
darashi / eyefi_receiver.rb
Created June 11, 2009 06:19
Eye-fi receiver
#!/usr/bin/ruby
#
# Eye-fi receiver
# -- An imcomplete implementation of Gallery Remote Protocol Server
# by SHIDARA Yoji <[email protected]>
#
# see http://codex.gallery2.org/Gallery_Remote:Protocol
#
require 'fileutils'
require 'sinatra'
@andruby
andruby / dyndns_update.rb
Created April 17, 2010 11:01
Zerigo dynamic dns updater
#!/usr/bin/env ruby
# Dynamic DNS updater by Andruby for Zerigo
# www.andrewsblog.org
ApiKey = 'myzerigoapikey' # your Zerigo API key
Host = 'test.example.com' # the host you want to dynamically update
User = '[email protected]' # your Zerigo username
NameServer = 'a.ns.zerigo.net' # Zerigo nameserver to query
LastIpTmpFile = '/tmp/dyn_update_last_ip' # a temporary file where we store the last ip adress
@maraigue
maraigue / devnull.rb
Created April 17, 2010 15:46
Ruby implementation of null file (like /dev/null on Un*x, NUL on Windows) The newest version is available by "gem install devnull". See also: http://github.com/maraigue/devnull
# NOTE:
# This version is out-of-date.
# Please access http://github.com/maraigue/devnull for the versions under development.
# Ruby implementation of null file (like /dev/null on Un*x, NUL on Windows)
# (C) 2010- H.Hiro(Maraigue) [email protected]
#
# DevNull works like an IO object. For example:
# dn = DevNull.new
# dn.puts "foo" # => nil (do nothing)
@frsyuki
frsyuki / gist:384544
Created April 30, 2010 00:54
MessagePack dynamic class
#include <msgpack.hpp>
#include <tr1/memory>
#include <iostream>
class dynamic {
public:
typedef std::tr1::shared_ptr<msgpack::zone> shared_zone;
dynamic() { }
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@mizutomo
mizutomo / msgpack_enum.cpp
Created June 7, 2010 06:34
MessagePackによるenum型のシリアライズ/デシリアライズ
#include <msgpack.hpp>
#include <vector>
#include <map>
#include <iostream>
#include <cstdio>
typedef enum {
CIRCLE = 0,
SQUARE = 1,
TRIANGLE = 2
@takumikinjo
takumikinjo / .gitignore
Created August 5, 2010 13:56
HTML5 Presentation export for Org-mode
README.html
;;設定
;;(require 'git-status)
;;psvn.el http://www.xsteve.at/prg/emacs/psvn.el からの移植
(eval-when-compile (require 'cl))
(require 'vc-git)
(add-to-list 'vc-handled-backends 'Git)
(defvar git-status-state-mark-modeline t
"modeline mark display or not")
@hitode909
hitode909 / _up
Created October 2, 2010 04:18
上に行くcd
#compdef up
segments=$(perl -le '$p=$ENV{PWD};$p =~ tr/\// /; print $p')
_arguments "1:first:($segments)"
[OptimizeGoogle]
http://itpro.nikkeibp.co.jp/word/*
http://*.ceron.jp/*
http://ceron.jp/*
http://tweetbuzz.jp/*
/http:\/\/(\w+\.)*buzzurl\.jp//i
http://wadaino.jp/*
http://eimg.jp/*
http://*.eimg.jp/*
http://d.hatena.ne.jp/keyword/*