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: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 / gist:1343964
Created November 7, 2011 01:30
.emacs diff
(setq vc-handled-backends nil)
@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 / 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: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 / correct.html
Last active September 29, 2015 01:36
Viewport experiments
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=5.0,width=200">
</head>
<body>
<div style='width: 100px; height: 100px; background-color:red;'>100x100</div>
<h1>Hello! I'm correct!</h1>
<div>The initial-scale should work. You sould see zoomed text (x5.0).</div>
</body>
@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:1655408
Created January 22, 2012 04:04
/etc/hosts 追記分
127.0.0.1 plus.google.com
127.0.0.1 twitter.com
127.0.0.1 www.facebook.com
127.0.0.1 b.hatena.ne.jp
127.0.0.1 mixi.jp
/*
* Generated by dtrace(1M).
*/
#ifndef _TRACING_H
#define _TRACING_H
#include <unistd.h>
#ifdef __cplusplus
@omo
omo / vp.html
Last active September 30, 2015 01:24
More viewport experiment
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='initial-scale=1, width=device-width, height=device-height' />
<script>
window.addEventListener('load', function() {
var c = document.getElementById('console');
c.innerHTML = ("w=" + window.innerWidth + " h=" + window.innerHeight);
});
</script>