Skip to content

Instantly share code, notes, and snippets.

☕️

akira yamada arika

☕️
Block or report user

Report or block arika

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@arika
arika / tdiary-export.rb
Created Nov 12, 2008
exports tDiary data ad HTML text
View tdiary-export.rb
#!/usr/bin/ruby
#
# this script dumps diary data from tDiary 2.2.x.
#
# usage: $0 /path/to/tdiary/dir [/path/to/tdiary.conf/dir] > tdiary.dat
#
# Author: akira at arika.org
# License: tDiary's
config_override = proc do |config|
@arika
arika / tdiary2typo.rb
Created Nov 12, 2008
imports data generated by tddump.rb to typo.
View tdiary2typo.rb
#!/usr/bin/ruby
#
# this script imports dump data of tDiary 2.2.x to Typo 5.1.x.
# (ref: http://gist.github.com/24118)
#
# usage: /path/to/typo-base-dir/script/runner tdiary2typo.rb /path/to/tdiary.dat
#
# Author: akira at arika.org
# License: Ruby's
View gonzui-rack.rb
# gonzui <http://gonzui.sf.net> wrapper for Rack
unless defined?(GONZUIRC)
GONZUIRC = File.expand_path('~/.gonzuirc')
end
require 'gonzui'
require 'gonzui/webapp'
class GonzuiWEBrickServletApp
View reload_rubygems_test.rb
# reload anoter version of RubyGems
lp0 = $:.dup
ENV["GEM_HOME"] = "/tmp/GEM"
$:.unshift "REL_1_1_1/lib"
p require "rubygems" #=> true
p Gem::RubyGemsVersion #=> "1.1.1"
gem "rails"
lp1 = $:.dup
@arika
arika / 書籍「プログラミング言語Ruby」とRuby 1.9.1RC2のNEWSファイルの対応状況
Created Jan 29, 2009
書籍「プログラミング言語Ruby」とRuby 1.9.1RC2のNEWSファイルの対応状況
View 書籍「プログラミング言語Ruby」とRuby 1.9.1RC2のNEWSファイルの対応状況
書籍「プログラミング言語Ruby」と
Ruby 1.9.1RC2のNEWSファイルの対応状況。
o - 記述あり
x - 記述なし
- - 対象範囲外
? - 未確認・判断できず
------------------------------------------------------------------------------
= NEWS
View gist:102015
diff --git a/lib/capistrano/command.rb b/lib/capistrano/command.rb
index 8e0c61b..87a4c41 100644
--- a/lib/capistrano/command.rb
+++ b/lib/capistrano/command.rb
@@ -207,13 +207,15 @@ module Capistrano
if options[:shell] == false
shell = nil
+ shell, cmd = replace_environment(shell, cmd)
else
@arika
arika / gist:183708
Created Sep 9, 2009
re: gist:183701
View gist:183708
pinned = Pin.find(:all,:conditions => [ 'pins.eid = last_modifieds.eid AND user_id = ?','arika' ], :joins => 'LEFT OUTER JOIN last_modifieds', :order => 'last_modifieds.date desc',:offset =>0,:limit => 10)
D,[22:27:06.977] Pin Load (0.0ms) Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (pins.eid = last_modifieds.eid AND user_id = 'arika') ORDER BY last_modif' at line 1: SELECT `pins`.* FROM `pins` LEFT OUTER JOIN last_modifieds WHERE (pins.eid = last_modifieds.eid AND user_id = 'arika') ORDER BY last_modifieds.date desc LIMIT 0, 10
View re: gist:183674
pinned = Pin.find(:all,:conditions => [ 'user_id = ?','arika' ], :joins => 'LEFT OUTER JOIN last_modifieds ON pins.eid = last_modifieds.eid', :order => 'last_modifieds.date desc',:offset =>0,:limit => 10)
D,[22:31:17.510] Pin Load (0.6ms) SELECT `pins`.* FROM `pins` LEFT OUTER JOIN last_modifieds ON pins.eid = last_modifieds.eid WHERE (user_id = 'arika') ORDER BY last_modifieds.date desc LIMIT 0, 10
@arika
arika / capistrano_upstream_helper.rb
Created Oct 3, 2009
An experimental helper. It makes Capistrano tasks that can refer its upstream hosts/roles
View capistrano_upstream_helper.rb
module UpstreamSupport
module Utils
def initialize(config)
@config = config
end
def to_ary
to_a
end
@arika
arika / auto_search.rb
Created Oct 26, 2009
termtter plugin: searches keywords automatically
View auto_search.rb
# -*- coding: utf-8 -*-
config.plugins.auto_search.set_default(:keywords, [])
module Termtter::Client
public_storage[:auto_search] ||= {
:since_id => nil,
:keyword => {},
}
You can’t perform that action at this time.