This file contains hidden or 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 'date-utils' | |
| module.exports = (robot) -> | |
| robot.respond /([^\s]*)\s?の\s?([^\s]*)\s?の運勢/i, (msg) -> | |
| dateArgs = msg.match[1] | |
| signArgs = msg.match[2] | |
| date = switch dateArgs | |
| when '昨日' | |
| Date.yesterday() |
This file contains hidden or 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 'active_record' | |
| DATABASE_NUM = ENV['CI_DATABASE_NUM'] || 2 | |
| namespace :ci do | |
| task :test_environment => :environment do | |
| ENV['RAILS_ENV'] = Rails.env = ActiveRecord::Tasks::DatabaseTasks.env = 'test' | |
| end | |
| namespace :db do |
This file contains hidden or 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
| minitest ~> 4.7.3 | |
| $ ci-test $(find -L $PWD/test -name \*_test.rb) | |
| Starting test-queue master (/tmp/test_queue_16649_70329599330480.sock) | |
| ==> Summary (8 workers in 2.5028s) | |
| [ 8] 0 tests, 0 assertions, 0 failures, 0 errors, 0 skips 0 suites in 0.0055s (pid 16702 exit 0) | |
| [ 1] 6 tests, 16 assertions, 0 failures, 0 errors, 0 skips 2 suites in 1.0579s (pid 16695 exit 0) |
This file contains hidden or 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
| # FYI: | |
| # http://www.j7lg.com/archives/1732 | |
| require 'xcodeproj' | |
| def bail_if_nil(obj, msg) | |
| return unless obj.nil? | |
| puts msg | |
| exit | |
| end |
This file contains hidden or 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 'csv' | |
| input = ARGV[0] || 'exported_contacts.CSV' | |
| output = "#{Time.now.strftime('%Y%m%d-%H%M%S')}.vcf" | |
| groups = { | |
| 'グループなし' => 0, | |
| } | |
| File.open(output, 'w:cp932') do |file| |
This file contains hidden or 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
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>Microsoft Translate</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script> | |
| $(function () { | |
| $('#trans').on('click', function (e) { | |
| e.preventDefault(); | |
| var loading = $('p#loading').toggle(), |
This file contains hidden or 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
| <ul id="ticker"> | |
| <li class="bd"> | |
| <p id="slide"> | |
| <span> | |
| 2012/01/24 | |
| <a href="http://www.google.com">text00</a> | |
| </span> | |
| <span> | |
| 2011/11/08 |
This file contains hidden or 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
| function is_mobile () { | |
| var useragents = [ | |
| 'iPhone', // Apple iPhone | |
| 'iPod', // Apple iPod touch | |
| 'Android', // 1.5+ Android | |
| 'dream', // Pre 1.5 Android | |
| 'CUPCAKE', // 1.5+ Android | |
| 'blackberry9500', // Storm | |
| 'blackberry9530', // Storm | |
| 'blackberry9520', // Storm v2 |
This file contains hidden or 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 'RMagick' | |
| convertedCnt = 0 | |
| ARGV.each do |filename| | |
| img_type = File.extname(filename).downcase | |
| if (img_type==".png")||(img_type==".jpg")||(img_type==".tif") | |
| ext = File.extname(filename) | |
| base = File.basename(filename,ext) |
This file contains hidden or 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
| #!env ruby | |
| require 'rubygems' | |
| require 'RMagick' | |
| images_dir = ARGV[0] | |
| if images_dir == nil | |
| puts "Error! Input images directory" | |
| exit | |
| end |
OlderNewer