Skip to content

Instantly share code, notes, and snippets.

View omo's full-sized avatar

Hajime Morrita omo

  • Mountain View, CA
View GitHub Profile
@omo
omo / gist:1619569
Created January 16, 2012 07:24
JSC exp list diff
--- ../beforeu.txt 2012-01-16 16:16:17.000000000 +0900
+++ ../afteru.txt 2012-01-16 16:16:51.000000000 +0900
@@ -114,6 +114,7 @@
T __ZN3JSC10JSFunction6createEPNS_9ExecStateEPNS_14JSGlobalObjectEiRKNS_10IdentifierEPFPvS2_ESA_
S __ZN3JSC10JSFunction6s_infoE
T __ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
+T __ZN3JSC10JSFunctionC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
T __ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE
T __ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE
T __ZN3JSC11JSByteArray10putByIndexEPNS_6JSCellEPNS_9ExecStateEjNS_7JSValueE
@omo
omo / gist:1366887
Created November 15, 2011 11:48
Symbols to be covered.
Location is not found: _ZN3JSC10Heuristics17numberOfGCMarkersE
Location is not found: _ZN3JSC10Heuristics24opaqueRootMergeThresholdE
Location is not found: _ZN3JSC10JSFunction6s_infoE
Location is not found: _ZN3JSC11JSByteArray6s_infoE
Location is not found: _ZN3JSC12DateInstance6s_infoE
Location is not found: _ZN3JSC12JSGlobalData11jsArrayVPtrE
Location is not found: _ZN3JSC12JSGlobalData12jsStringVPtrE
Location is not found: _ZN3JSC12JSGlobalData14jsFunctionVPtrE
Location is not found: _ZN3JSC12JSGlobalThis6s_infoE
Location is not found: _ZN3JSC12RegExpObject6s_infoE
@omo
omo / tj.el
Created November 14, 2011 01:51
Open an octopress file in Emacs.
;; on setup
(setq tj-name "/Users/morrita/work/trivials/tj.rb")
;;
;; Create and open the journal file
;;
(when (bound-and-true-p tj-name)
(defun my-open-tj (given-title)
(interactive "MTitle: ")
(let ((welcome-page
@omo
omo / gist:1347579
Created November 8, 2011 11:53
open today's journal. used from emacs.
#!/usr/bin/env ruby
require "date"
Dir::chdir(File::join(ENV["HOME"], "work/octopress"))
if (ARGV[0] == "pub")
system("bash -l -c 'rvm use 1.9.2 && rake generate deploy'")
exit
end
@omo
omo / gist:1343964
Created November 7, 2011 01:30
.emacs diff
(setq vc-handled-backends nil)
@omo
omo / gist:629832
Created October 16, 2010 14:26
information hiding violation
...
target.startRoundFor(new tfil.Round([card1]));
target.startReview();
assertTrue(target.reviewBox_.isVisible());
// here!
tfil.ui.takeAction(target.reviewBox_.scoreBox_.proceedButton_);
...
@omo
omo / async testsucks.js
Created September 20, 2010 15:32
async test sucks.
var testDbCardStoragePutSouldCount = function() {
doTestDbCardStorage(
"test1",
function(done, target) {
target.count(
function(cnt) {
assertEquals(0, cnt);
target.put(
tfil.test.HELLO_CARD_RECORD,
function() {
;; modified http://www.emacswiki.org/emacs/TinyUrl
(require 'thingatpt)
(defun my-get-shorter-bug-url(longer-uri)
(cond ((string-match "bugs.webkit.org" longer-uri)
(let ((num-start (string-match "[[:digit:]]" longer-uri)))
(concat "http://webkit.org/b/" (substring longer-uri num-start))))
((string-match "http://code.google.com/p/chromium/issues" longer-uri)
(let ((num-start (string-match "[[:digit:]]" longer-uri)))
(concat "http://crbug.com/" (substring longer-uri num-start))))
((error (concat longer-uri " is not bug url")))))
append 48360
add 11626
put 10803
decode 10319
write 7416
get 6568
access 6497
create 6418
read 6093
value 4416
@omo
omo / gist:11606
Created September 19, 2008 15:10
/* socket */
static VALUE socket(VALUE obj)
{
MYSQL* m = GetHandler(obj);
return INT2NUM(vio_fd(m->net.vio));
}