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
^\s*p\s+[^=(?+\-\*\/{] |
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
#!/usr/bin/env ruby | |
# @see: http://stackoverflow.com/questions/5658510/curl-json-post-request-via-terminal-to-a-rails-app | |
unless ARGV.size == 3 | |
puts <<EOB | |
Usage: http_req url method data | |
ex) http_req http://localhost:3000/movies/new.json post "{ movie:{ title:'Star Wars IV'} }" | |
EOB | |
exit |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ITO SOFT DESIGN.</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
</head> | |
<body> | |
<% info = @personal_info %> | |
<% english = info["company"]["name"] == 'ITO SOFT DESIGN Inc.' %> | |
<dl> |
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
参照 | |
http://blog.lampetty.net/blog_ja/index.php/archives/475 | |
http://mxcl.github.io/homebrew/ | |
http://qiita.com/marutanm/items/3da5d8895d0059df24d2 | |
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
$ brew doctor | |
$ brew install ruby | |
$vi ~/.bash_profile |
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 'open-uri' | |
url = URI.escape('http://marking.herokuapp.com/reports.json?category=コイン精米所&place=39.49591064453125,140.5938110351562&r=20') | |
open(url).read |
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
# 参照: | |
# http://ameblo.jp/murajun1/entry-11266484358.html | |
$ brew install freetds | |
$ gem install tiny_tds | |
$ gem install activerecord-sqlserver-adapter | |
$ rails new sqlserver-test | |
$ cd sqlserver-test | |
# Windows設定 |
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
# -*- coding: utf-8 -*- | |
# | |
# KVCの問題: | |
# Rubyのsetterを定義した場合にKVCでRubyのsetterが呼び出されない。 | |
# | |
# 結果: | |
# WARN: bazはnilにしないでください。 | |
# | |
# 問題: | |
# WARN: quuzはnilにしないでください。 |
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
# -*- coding: utf-8 -*- | |
class AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
controller = MainViewController.alloc.init | |
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(controller) | |
@window.makeKeyAndVisible | |
true | |
end | |
end |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 4 in line 1.
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
project | |
name,launch_page_no,style,transition | |
三菱電機サンプル,0,irPanel,push | |
page | |
page_no,class,title,background_color_name,locked,right_page_no | |
0,Page,,,0,1 | |
page::items | |
class,x,y,width,height,style,title,alternate_title,line_width,corner_radius,padding,shape,lamp_negative,interlock_negative,switch_device_name,switch_mode,switch_negative,title_for_button,device_name,alternate_text_color_name,lamp_color_name,page_no |
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 1 column, instead of 8 in line 4.
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
page | |
page_no | |
3 | |
page::items | |
class,x,y,width,height,style,device_name,title | |
Button,0,0,256,153,Square,M0,ランプ1 | |
Button,0,153,256,153,Square,M1,ランプ2 | |
Button,0,306,256,153,Square,M2,ランプ3 | |
Button,0,459,256,153,Square,M3,ランプ4 |