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
Back traces | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+ | |
| Name | Time (ms) | | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+ | |
| +---org.jruby.util.ByteList.lookup(String) | 60 100 % | | |
| | |
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
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 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 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 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 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 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.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.ScheduledThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.Measurement; |
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
// ==UserScript== | |
// @name test | |
// @namespace https://github.com/the8472 | |
// @include * | |
// @version 1 | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @run-at document-end | |
// ==/UserScript== |
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
"use strict"; | |
const { Cc, Ci, Cr } = require('chrome'); | |
const ioservice = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService); | |
const events = require("sdk/system/events"); | |
const listener = function(event) { | |
let {subject, type, data} = event; |
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
### remote RPCs | |
Method REQ | RSP Errors | |
PING 3832900629 | 3832944684 0 | |
FIND_NODE 15033719926 | 15028735737 0 | |
GET_PEERS 30474134400 | 30482866044 0 | |
ANNOUNCE_PEER 3739103559 | 3541140713 198040816 | |
GET 661604 | 661600 0 | |
PUT 76383 | 61719 14664 | |
UNKNOWN 120320970 | 120321404 62307537 |