Skip to content

Instantly share code, notes, and snippets.

@mnicovideo
mnicovideo / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@mnicovideo
mnicovideo / hello_world.js
Last active August 29, 2015 13:57
socrates is dies, the exploited is not dies.
Object.generate = Object.generate ? Object.generate : function(proto) {
function F() {}
if (!proto) {
return F;
}
if (typeof proto === 'function') {
F.prototype = new proto();
return F;
}
if (typeof proto === 'object' && proto.constructor === Object) {
@mnicovideo
mnicovideo / xxx_lang_quick_master-template.md
Last active December 19, 2015 17:58
オブジェクト指向なプログラミング言語の理解をまとめる時のテンプレート。

XXX言語クイックマスター

ここでXXX言語の簡単な説明とか。

開発と実行の環境

コンパイラ or インタープリタとか。どう書いてどう実行するか。プログラムの書き方、コメントの書き方。コンパイルチェック、デバッガーの起動など。

-- use it as service of automator
on run {input, parameters}
do shell script "date +%Y-%m-%d\\ %H.%M.%S"
set the clipboard to input & " - " & result as text
tell application "System Events"
the path to the frontmost application
the name of the result
@mnicovideo
mnicovideo / create_dynamic_script-object.applescript
Last active December 15, 2015 08:49
create dynamic script object.
on createTheObject(objectName)
run script "
script " & (objectName as text) & "
property theProp : missing value
on theHandler()
log theProp
end theHandler
end script
return " & (objectName as text)
end createTheObject
(* closure of applescript *)
on theClosure()
script outer
property x : 0
script inner
set x to x + 1
end script
end script
return inner of outer