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> | |
| /[if lt IE 7 ] <html class="ie ie6" lang="en"> | |
| /[if IE 7 ] <html class="ie ie7" lang="en"> | |
| /[if IE 8 ] <html class="ie ie8" lang="en"> | |
| / [if (gte IE 9)|!(IE)]><! | |
| %html{:lang => "en"} | |
| / <![endif] | |
| %head | |
| %meta{:charset => "utf-8"} | |
| %title= yield :title |
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
| #logo | |
| margin-top: 30px | |
| color: #c00 | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif | |
| letter-spacing: -1px | |
| font-weight: bold |
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' | |
| begin | |
| open('http://onlineshop.mb.softbank.jp/ols/html/model/ipad/') | |
| `say "iPad2 online shop page opened!"` | |
| rescue Exception => e | |
| unless e.to_s =~ /^403/ | |
| `say "iPad2 online shop status changed #{e}"` | |
| end | |
| 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
| class TestFinally { | |
| int num; | |
| public static void main(String[] args) { | |
| TestFinally test = new TestFinally(); | |
| int ret = test.increment(); | |
| assert ret == 1; | |
| assert test.num == 2; | |
| System.out.println("Done."); | |
| } |
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
| file_cache_path "/tmp/chef-solo" | |
| cookbook_path "#{ENV['HOME']}/chef-repo/cookbooks" | |
| role_path "#{ENV['HOME']}/chef-repo/roles" |
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 convertWithLang(timeAgo, lang) { | |
| if (lang == "ja") | |
| return toJa(timeAgo); | |
| return timeAgo; | |
| } | |
| function convert(timeAgo, dict, strip) { | |
| var delim = " "; | |
| var arr = timeAgo.split(delim); |
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 | |
| require 'rubygems' | |
| require 'jira4r' | |
| $KCODE = 'u' | |
| config = {} | |
| log = {} | |
| open("|git config --list | grep 'jira.*=*'").each_line do |line| |
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 'sqlite3' | |
| class Coredata | |
| attr_accessor :db | |
| def initialize(app_name) | |
| pattern = File.join("#{ENV['HOME']}", | |
| "/Library/Application Support/iPhone Simulator/*", | |
| "/Applications/*/Documents/#{app_name}.sqlite") |
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
| NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; | |
| if (newSectionIndex != nil) | |
| [self.tableView insertSections:newSectionIndex | |
| withRowAnimation:UITableViewRowAnimationFade]; | |
| else | |
| [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] | |
| withRowAnimation:UITableViewRowAnimationFade]; |
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 'nokogiri' | |
| require 'eeepub' | |
| DOC_TITLE = 'Ruby on Rails Guides' | |
| def get_pages(src_dir) | |
| index_file = File.join(src_dir, 'index.html') | |
| section = nil | |
| pages = [{ :section => section, :title => DOC_TITLE, :path => index_file }] |