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
buildView: function() { | |
let window = windowUtils.getMostRecentBrowserWindow(); | |
let doc = window.document; | |
let content = doc.getElementById("appcontent"); | |
let splitter = doc.createElementNS(XUL_NS, 'splitter'); | |
splitter.setAttribute("resizeafter","closest") | |
splitter.setAttribute("resizebefore","closest") |
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/ruby | |
require "rubygems" | |
gem "rb-inotify" | |
require "rb-inotify" | |
notifier = INotify::Notifier.new | |
event_handler = proc do | |
puts "change detected, running CI" |
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 | |
gem 'activerecord', "~> 3.2.0" | |
gem "squeel" | |
gem "globalize", "~> 3.0.0" | |
gem 'sqlite3' | |
require "active_record" | |
require "squeel" | |
#require "globalize" |
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
gem 'rails', "~> 3.2" | |
gem 'squeel', "~> 1.1" | |
gem 'sqlite3' | |
require "active_record" | |
require "squeel" | |
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" | |
class A < ActiveRecord::Base |
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 "dalli" | |
module ActiveSupport::Cache | |
# unlike the "official" dalli store this subclasses the abstract Store class which handles nil values properly | |
# also implement the local cache strategy to avoid network hits | |
class SimpleDalliStore < Store | |
def initialize(*addresses) | |
opts = addresses.extract_options! |
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
Back traces | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+ | |
| Name | Time (ms) | | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+ | |
| +---org.jruby.util.ByteList.lookup(String) | 60 100 % | | |
| | |
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
diff --git a/src/org/jruby/RubyBasicObject.java b/src/org/jruby/RubyBasicObject.java | |
index 2bb34e8..6de4bef 100644 | |
--- a/src/org/jruby/RubyBasicObject.java | |
+++ b/src/org/jruby/RubyBasicObject.java | |
@@ -38,6 +38,7 @@ | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; | |
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; |
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
import java.lang.reflect.Field; | |
import java.security.SecureRandom; | |
import sun.misc.Unsafe; | |
public class Test2 { | |
static final Unsafe unsafe; | |
static final long offsetA; | |
static final long offsetB; |
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
Compiled method (c2) 593 8 Test2::test1 (46 bytes) | |
total in heap [0x029af8c8,0x029b0184] = 2236 | |
relocation [0x029af99c,0x029af9b8] = 28 | |
main code [0x029af9c0,0x029afd00] = 832 | |
stub code [0x029afd00,0x029afd10] = 16 | |
oops [0x029afd10,0x029afd14] = 4 | |
metadata [0x029afd14,0x029afd18] = 4 | |
scopes data [0x029afd18,0x029afddc] = 196 | |
scopes pcs [0x029afddc,0x029b013c] = 864 | |
dependencies [0x029b013c,0x029b0140] = 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
### ruby 1.9.3 + railsexpress patches + GC tuning + -march=native -O3 | |
time ruby script/rails r 'Post.count' | |
real 0m1.008s | |
user 0m0.820s | |
sys 0m0.180s | |
### jruby 1.7.2-dev 2012-12-12 + java 64bit 1.8.0-ea-b67 hotspot 25.0-b11 |