Skip to content

Instantly share code, notes, and snippets.

View okuryu's full-sized avatar

Ryuichi Okumura okuryu

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>YUI 3 throttle function test</title>
</head>
<body>
<p>YUI 3 throttle function test</p>
<script type="text/javascript" src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
<script type="text/javascript">
#!/usr/bin/env node
if (!process.argv[2] || !process.argv[3]) {
console.log('Usage: ' + process.argv[1] + ' <Flickr API Key> <User NSID>');
process.exit();
};
const API_KEY = process.argv[2];
const USER_ID = process.argv[3];
const FLICKR_DOMAIN = 'api.flickr.com';
@okuryu
okuryu / output.txt
Created December 19, 2010 14:27
Build YUI 3 module error.
$ ant -q all
[post] Exception in thread "Thread-8" /Users/okuryu/work/builder/componentbuild/shared/macrolib.xml:135: java.net.ConnectException: Connection refused
[post] at net.sf.antcontrib.net.PostTask$2.run(PostTask.java:404)
[post] Caused by: java.net.ConnectException: Connection refused
[post] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[post] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[post] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[post] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[post] at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1496)
[post] at java.security.AccessController.doPrivileged(Native Method)
$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
$ ant -version
Apache Ant version 1.8.1 compiled on September 21 2010
$ ant -q all
[post] Exception in thread "Thread-8" /Users/okuryu/work/builder/componentbuild/shared/macrolib.xml:135: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8081/
[post] at net.sf.antcontrib.net.PostTask$2.run(PostTask.java:404)
[post] Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8081/
@okuryu
okuryu / yui.coffee
Created March 15, 2011 15:06
YUI x CoffeeScript x Node.js Example
$ node yui.js
info: (yui): Modules missing: io, 1
info: (yui): Fetching loader: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/loader/loader-debug.js
info: (get): URL: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/loader/loader-debug.js
info: (get): Loaded: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/loader/loader-debug.js
info: (yui): Modules missing: oop,parallel,event-custom-base,nodejs-dom,event-base,dom,node-base,dom-style-ie,node-style,queue-promote,datatype-xml,io,io-nodejs, 13
info: (yui): Using Loader
info: (loader): attempting to load oop, /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/
info: (get): URL: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/oop/oop-min.js
info: (get): Loaded: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/oop/oop-min.js
[okuryu@okuryu]$ ~/work/yeti/cli.js src/dom/tests/dom.html
Waiting for results.
✖ DOM Test Suite on Firefox (8.0) / Mac OS
20 passed, 1 failed
in DOM
test_position: setXY([100, 200]
Expected: 200 (number)
Actual: 199 (number)
✔ DOM Test Suite on Safari (5.1) / Mac OS
[okuryu@okuryu]$ ~/work/yeti/cli.js src/dom/tests/dom.html
Waiting for results.
✖ DOM Test Suite on Firefox (7.0.1) / Windows Vista
20 passed, 1 failed
in DOM
test_position: setXY([100, 200]
Expected: 200 (number)
Actual: 199 (number)
Failures: 1 of 21 tests failed. (2924ms)
@okuryu
okuryu / gist:1367067
Created November 15, 2011 13:26
YUIConf 2011
@okuryu
okuryu / v0.6.12.txt
Created March 10, 2012 08:14
Compare npm root on Node v0.6.12/v0.7.5/v0.7.6-pre
$ pwd
/Users/okuryu/work/npm-global
$ node -v
v0.6.12
$ npm -v
1.1.4
$ npm root
/Users/okuryu/work/npm-global/node_modules
$ npm root -g
/usr/local/lib/node_modules
@okuryu
okuryu / gist:2413819
Created April 18, 2012 14:05
Setup Ubuntu

Setup Ubuntu

Setting SSH key

Create the pair of your key on your local machine.

$ mkdir -m 700 ~/.ssh
$ ssh-keygen
$ chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub
$ cat ~/.ssh/id_rsa.pub