Skip to content

Instantly share code, notes, and snippets.

@ama-ch
ama-ch / hoge.js
Last active August 4, 2016 12:17
// 他の言語でありそうなコード
response = get('https://api.github.com'); # レスポンスが帰るまで待つ
print(response);
// JS(jQuery)
$.get('https://api.github.com', function(response) {
console.log(response);
});
// ES6
foo bar
var inputs = process.argv.slice(2);
var result = inputs.map((x) => x[0]).reduce((result, x) => result += x);
console.log(result);
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
// Input 3: /closure/goog/disposable/disposable.js
function $goog$Disposable$$() {
1 != $goog$Disposable$MonitoringMode$OFF$$ && (this.$creationStack$ = Error().stack, $goog$Disposable$instances_$$[$goog$getUid$$(this)] = this)
}
...
// Input 4: /closure/goog/debug/error.js
function $goog$debug$Error$$($opt_msg$$) {
Error.captureStackTrace ? Error.captureStackTrace(this, $goog$debug$Error$$) : this.stack = Error().stack || "";
$opt_msg$$ && (this.message = String($opt_msg$$))
}
function $Book$$() {
this.$title_$
}
function $JSCompiler_StaticMethods_showTitle$$($JSCompiler_StaticMethods_showTitle$self$$) {
if(!$JSCompiler_StaticMethods_showTitle$self$$.$title_$) {
throw Error();
}
console.log($JSCompiler_StaticMethods_showTitle$self$$.$title_$)
}
var $book1$$ = new $Book$$, $book2$$ = new $Book$$;
var obj = {locationUri:"http://example.com/"};
console.log(obj.locationUri);
console.log(obj.locationUri);
var a = {a:"kintone"};
a.hasOwnProperty("onamae") && console.log(a.onamae);
// ADVANCEDコンパイル後もmyapp.MyClass.someMethodにアクセスできるようにする
goog.exportSymbol('myapp.MyClass.someMethod', myapp.MyClass.someMethod);
@ama-ch
ama-ch / Fullpage.html
Created May 13, 2012 23:32
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CodePen &middot; A Pen by ama-ch</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/normalize.css">