- Canvas [MDN] [Spec (WHATWG)]
- SVG [MDN (en)] [Spec (W3C)]
- CSS 3
- Video, Audio [MDN] [Spec (WHATWG)]
- Form Validation [MDN] [Spec (WHATWG)] (?)]
- HTML Editing APIs (RTE)] [MDN] [Spec (W3C)]
- Drag & Drop [MDN] [[Spec (WHATWG)](http://www.whatw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * HTML文字列中から危険なものを取り除く。 | |
| * | |
| * @example | |
| * var src = safeHtml('[<'+'script>alert(1)<'+'/script>]'); | |
| * var dest = '[]'; | |
| * console.assert(src===dest, 'script'); | |
| * | |
| * @example | |
| * var src = safeHtml('<img src="404" onerror="alert(1)">'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rx = /^ビッグブラザー[はが]あなたを(見て|見守って)いる$/; | |
| _.all([ | |
| 'ビッグブラザーはあなたを見ている', | |
| 'ビッグブラザーがあなたを見ている', | |
| 'ビッグブラザーはあなたを見守っている', | |
| 'ビッグブラザーがあなたを見守っている', | |
| ], function(text, index) { | |
| return rx.test(text); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .nested-fields | |
| = f.input :file, as: :image_preview, input_html: { 'data-url' => work_images_path, 'data-form-data' => "{\"token\":\"#{@work.token}\"}" } | |
| = f.input :caption | |
| = link_to_remove_association t('simple_form.cocoon.remove_link'), f, class: 'right' |
- 公開する仕組みがない
- wiki
- イントラブログ
- GHE+gist
- 検索機能がない
- 使いやすいのあるかな……
- 公開しても見返りがない
- 論文の参考文献みたいに参照件数をカウントしてみては
- 公開した結果、無知を晒すのが怖い
- 公開した結果、他人が得するのが面白くない
- 四角い枠の中にボール
- フリックでこすると転がる
- ※ボールは
transform:translate()で移動する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo == アプリ作成 == | |
| rails new uploader | |
| cd uploader | |
| echo == CarrierWave導入 == | |
| echo "gem 'carrierwave'" >> Gemfile | |
| bundle | |
| echo == 投稿モデル作成 == | |
| rails g scaffold post name:string comment:text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // (start) -> Any jobs... -> "OK 1" -> Any jobs... -> "OK 3" -> Any jobs... -> "OK 3" | |
| Promise(function(resolve) { | |
| console.log('OK 1'); | |
| setTimeout(resolve, 1000); | |
| }).then(function() { | |
| Promise(function(resolve) { | |
| console.log('OK 2'); | |
| setTimeout(resolve, 1000); | |
| }).then(function() { | |
| console.log('OK 3'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var obj1 = { name:'Alice' }; | |
| var obj2 = { name:'Bob' }; | |
| function say(talk, age) { | |
| console.log(talk + ', I am ' + this.name + ', ' + age + ' years old.'); | |
| } | |
| say.apply(obj1, ['Hi', 12]); // "Hi, I am Alice, 12 years old." | |
| say.apply(obj2, ['Good morning', 36]); // "Good morning, I am Bob, 36 years old." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function f(aaa, bbb) { | |
| console.log('aaa='+aaa, 'bbb='+bbb); | |
| } | |
| var context = null; // 何でもいい(thisになる) | |
| var args = [ 'A', 'B' ]; // 引数に展開される | |
| f.apply(context, args); |