Skip to content

Instantly share code, notes, and snippets.

$ grep -i 'git' .emacs
(setq load-path (cons (expand-file-name "/usr/share/doc/git-core/contrib/emacs") load-path))
(require 'vc-git)
(when (featurep 'vc-git) (add-to-list 'vc-handled-backends 'git))
(require 'git)
(autoload 'git-blame-mode "git-blame"
"Minor mode for incremental blame for Git." t)
#!/usr/bin/env ruby
require 'pathname'
if ARGV.length < 1
p 'please input dir name'
else
@dir = Pathname.new(ARGV.shift).expand_path
@join_name = ARGV.join('_')
end
--- a/lib/jpmobile/mobile/abstract_mobile.rb
+++ b/lib/jpmobile/mobile/abstract_mobile.rb
@@ -48,6 +48,16 @@ module Jpmobile::Mobile
return false
end
+ # XXX: lib/jpmobile.rbのautoloadで先に各キャリアの定数を定義してるからできるよ
+ Jpmobile::Mobile.constants.each do |career|
+ next if self == Jpmobile::Mobile.const_get(career)
+ p career
@ishikawa
ishikawa / gist:3081
Created July 29, 2008 13:22
Installing PIL using setuptools
% easy_install --find-links http://www.pythonware.com/products/pil/ Imaging
index bdbaa13..7daa7e4 100644
--- a/lib/jpmobile/mobile/abstract_mobile.rb
+++ b/lib/jpmobile/mobile/abstract_mobile.rb
@@ -48,6 +48,15 @@ module Jpmobile::Mobile
return false
end
+ # XXX: lib/jpmobile.rbのautoloadで先に各キャリアの定数を定義してるからできるよ
+ Jpmobile::Mobile.constants.each do |career|
+ next if self == Jpmobile::Mobile.const_get(career)
voda = Jpmobile::Mobile::Vodafone.new({})
#=> #<Jpmobile::Mobile::Vodafone:0xb7bc0f18 @request={}>
voda.softbank?
#=> true
voda.vodafone?
#=> true
voda.jphone?
diff --git a/lib/jpmobile/mobile/abstract_mobile.rb b/lib/jpmobile/mobile/abstract_mobile.rb
index bdbaa13..2f88f11 100644
--- a/lib/jpmobile/mobile/abstract_mobile.rb
+++ b/lib/jpmobile/mobile/abstract_mobile.rb
@@ -48,6 +48,16 @@ module Jpmobile::Mobile
return false
end
+ # XXX: lib/jpmobile.rbのautoloadで先に各キャリアの定数を定義してるからできるよ
+ Jpmobile::Mobile.constants.each do |career|
get_week_price_from_date(day_date, property) dfdfdf
def solar_rebates(state, electricity, PVcost, PVcapacity, PVtype)
#electricity is the total electricity produced in a year in kWh
#PVcapacity is the total power of the installation in kW
#PVtype is "residential" or "non-residential"
@tax_credit = 0.0
@rebate = 0.0
@production_credit = 0.0
@REC_sale = 0.0
@residential_rebate = 0.0
yum install gcc kernel-devel
yum install libXtst-devel libXrender-devel
yum install xinetd
rpm -Uvh VMware-server-1.0.6-91891.i386.rpm
vmware-config.pl