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
- title: 測試活動 | |
date: "2012-01-05" | |
- title: uicafe | |
date: "2012-06-05" | |
- title: RGBA | |
date: "2012-07-05" |
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 PHPHandler | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env["PATH_INFO"] =~ /\.php$/ | |
php_path = env["PATH_INFO"][1..-1] | |
body = %x{php #{php_path}} | |
[200, {"Content-Type" => "text/html"}, body] |
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
// includes bindings for fetching/fetched | |
PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
this.page = 1; | |
}, | |
fetch: function(options) { | |
options || (options = {}); | |
this.trigger("fetching"); |
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
09:34 <@tka> wget http://tokyo1.linode.com/100MB-tokyo.bin | |
09:34 <@tka> 2011-09-20 09:36:14 (4.87 MB/s) - `100MB-tokyo.bin' saved [104857600/104857600] | |
09:34 <@tka> ping tokyo1.linode.com 50~70ms | |
09:36 <@tka> wget http://dallas1.linode.com/100MB-dallas.bin | |
09:37 <@tka> 2011-09-20 09:39:27 (1.16 MB/s) - `100MB-dallas.bin' saved [104857600/104857600] | |
09:37 <@tka> ping dallas1.linode.com 205ms |
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
memory usage in kilobytes | |
194688 | |
170944 | |
169600 | |
170252 | |
170960 | |
171720 | |
172312 | |
172668 | |
172996 |
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
$ compass create test_project; | |
$ cd test_projrct; | |
$ jruby -J-Xmx128m -J-d32 test.rb | |
memory usage in kilobytes | |
65496 | |
66360 | |
67316 | |
68224 | |
68496 |
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> | |
<style> | |
<!-- | |
body { | |
text-align: center; | |
} | |
#doc { |
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
a=Time.now.to_f | |
require 'stringio' | |
puts Time.now.to_f - a | |
require 'thread' | |
puts Time.now.to_f - a | |
require "open-uri" | |
puts Time.now.to_f - a | |
require "yaml" | |
puts Time.now.to_f - a |
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
# | |
# Returns a string which represents the time as dateTime defined by XML | |
# Schema: | |
# | |
# CCYY-MM-DDThh:mm:ssTZD | |
# CCYY-MM-DDThh:mm:ss.sssTZD | |
# | |
# where TZD is Z or [+-]hh:mm. | |
# | |
# If self is a UTC time, Z is used as TZD. [+-]hh:mm is used otherwise. |
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
var img = new Image(); | |
$(img).load(function(){ | |
alert('onload) | |
}); | |
img.src = 'demo.jpg'; |