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
<%# app/views/hoge_mailer/hoge.erb %> | |
<%=h _('ほげ') %> |
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 'open-uri' | |
require 'json' | |
module GoogleLanguage | |
extend self | |
URL = "http://ajax.googleapis.com/ajax/services/language/translate" |
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
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace Bipolarization | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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 'rubygems' | |
require 'spec' | |
require File.dirname(__FILE__) + '/../src/RSpecExample/bin/Debug/RSpecExample.dll' | |
include RSpecExample | |
describe Sample do | |
context "with args 'hoge', 'fuga' and 'piyo'" do | |
subject{ Sample.new('hoge', 'fuga', 'piyo') } | |
its(:Greet){ should == 'Hello hoge,fuga,piyo' } |
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 'android' | |
require 'webrick' | |
pic = '/sdcard/snapshot.jpg' | |
droid = Android.new | |
httpd = WEBrick::HTTPServer.new(:Port => 9998) | |
httpd.mount_proc('/') do |req, res| | |
return unless req.path == '/' | |
droid.cameraCapturePicture(pic) |
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 'test/unit' | |
require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'lib', 'zenra') | |
class ZenraTest < Test::Unit::TestCase | |
def setup | |
@appid = ENV['YAHOO_APPID'] | |
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
require 'System.Windows.Forms' | |
include System::Windows::Forms | |
f = Form.new | |
b = Button.new | |
b.text = 'Hello' | |
b.click.add lambda{|s, e| MessageBox.show(s.text)} | |
f.controls << b | |
f.show_dialog |
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
source 'http://rubygems.org' | |
gem 'sinatra' | |
gem 'dm-core' | |
gem 'dm-postgres-adapter' |
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
for jpeg in `find . -name "*.JPG"` | |
do | |
convert -geometry 28.4090909% $jpeg ${jpeg%.*}.jpg | |
done |
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 'open-uri' | |
require 'json' | |
module GoogleLanguage | |
extend self | |
URL = "http://ajax.googleapis.com/ajax/services/language/translate" |
OlderNewer