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.on(:resume) do | |
... | |
end | |
# app code | |
tableView = TableView.new | |
tableView.on(:select) do |v| | |
... | |
end | |
tableView.on(:cell) do |v, index| |
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
OVERVIEW: LLVM 'Clang' Compiler: http://clang.llvm.org | |
USAGE: clang -cc1 [options] <inputs> | |
OPTIONS: | |
-### Print the commands to run for this compilation | |
--analyze Run the static analyzer | |
--migrate Run the migrator | |
--relocatable-pch Build a relocatable precompiled header | |
--serialize-diagnostics <value> |
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
1, this, 17544 | |
2, that, 15950 | |
3, have, 9742 | |
4, with, 9584 | |
5, http, 8688 | |
6, node, 6024 | |
7, should, 5743 | |
8, error, 4285 | |
9, test, 4209 | |
10, work, 4175 |
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
#!/usr/bin/env ruby | |
# result | |
# https://docs.google.com/spreadsheet/ccc?key=0AldcEqcUVyo4dGZNOE9fTlE0YkZ2U2NTSF9jTmlJbkE&usp=sharing | |
require 'date' | |
filesizes = [] | |
date = Date.new(2012,5,1) | |
while date < Date.today |
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 'rubygems' | |
require 'xcodeproj' | |
FRAMEWORKS = %w{ | |
AudioToolbox | |
CFNetwork | |
CoreGraphics | |
CoreLocation |
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
class Command | |
def initialize(default_options = {}) | |
... | |
end | |
def run(options, params={}) | |
... | |
end | |
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
MRuby::Build.new do |conf| | |
conf.bins = %w(mrbc mruby mirb) | |
conf.cc do |cc| | |
cc.command = ENV['CC'] || 'gcc' | |
cc.flags = (ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration)) | |
cc.includes = [] | |
cc.defines = %w(MRB_INT64) | |
cc.option_include = '-I%s' | |
cc.option_define = '-D%s' |
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
sh$ CONFIG=./build_config.rb ./minirake all | |
---- | |
# build_config.rb | |
MRuby::Build.new do |conf| | |
conf.cflags = '-g' | |
conf.ldflags = 'xxx' | |
conf.cc = 'clang' |
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
#!/usr/bin/ruby | |
# require json gem. doen't support Ruby 1.8 bundled json library | |
# | |
# ex) /Users/Shared/Jenkins/Home/github-reporter.rb mobiruby mruby-cfunc "$GIT_COMMIT" "\*\*\* Passed tests \*\*\*" | |
require 'rubygems' | |
require 'yaml' | |
require 'github_api' | |
config = YAML.load(File.read(File.expand_path("~/.github.yml"))) |
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
# It's running on sub thread | |
# it isn't sharing with rubyvm_proposal1.rb's VM. | |
$action1_result = 0 | |
def action1a | |
$action1_result | |
end | |
def action1b |