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 closest(baseElement, className) { | |
| var targetElement = baseElement; | |
| if(!(targetElement.classList.contains(className))) { | |
| targetElement = baseElement.parentElement; | |
| return closest(targetElement, className); | |
| } | |
| return targetElement; | |
| } | |
| Array.prototype.forEach.call(document.querySelectorAll('[title=":+1:"], [title=":thumbsup:"]'), function(plusoneElement) { | |
| closest(plusoneElement, 'comment').style.display = 'none'; |
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 off | |
| chcp 65001 | |
| for /f %%i in ('git branch -a ^| peco') do ( | |
| git checkout %%i | |
| break | |
| ) |
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
| = サイトの要件定義と要素整理をしてみよう | |
| この章では、サイトを作る際の要件定義と要素の整理について解説します。 | |
| == 要件定義とは | |
| 制作が始まる前の上流工程として、要件定義という段階があります。Web サイトを制作する際に、このような内容を要件定義したほうが良いです。 | |
| * どんな Web サイトを作るか | |
| * どんな機能が必要か |
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 isJson(item) { | |
| item = typeof item !== "string" | |
| ? JSON.stringify(item) | |
| : item; | |
| try { | |
| item = JSON.parse(item); | |
| } catch (e) { | |
| return false; | |
| } |
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 Nozomi = require("nozomi"); | |
| var nozomi = new Nozomi(); | |
| var config = { | |
| env: "development" | |
| }; | |
| gulp.task('nozomi', function() { | |
| return gulp.src('path/to/src') | |
| .pipe(nozomi.build(config)) |
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 fs = require("fs"); | |
| var directory = "foo"; | |
| fs.mkdir(directory, function(err) { | |
| if (err) { | |
| console.log(err); | |
| return 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 fs = require("fs"); | |
| var directory = "foo"; | |
| fs.exists(directory, function(exists) { | |
| if (!exists) { | |
| fs.mkdir(directory, function(err) { | |
| if (err) { | |
| console.log(err); | |
| return 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 fs = require("fs"); | |
| var file = "file.txt"; | |
| fs.writeFileSync(file); | |
| fs.exists(file, function(exists) { | |
| fs.unlinkSync(file); | |
| console.log(exists); // true |
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
| imgs=document.querySelector(".deliver_article").getElementsByTagName("img");Array.prototype.forEach.call(imgs,function(img){img.src="http://amd.c.yimg.jp/im_siggWFU_j_ytRMs2os1h31FF.Q---x387-y600-q90/amd/20150828-00000015-famitsuapp_g-016-10-view.jpg";img.style.height="auto";}); |
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
| { | |
| "exclude": [ | |
| ".git/**", | |
| "node_modules/**", | |
| "bower_components/**" | |
| ], | |
| "always-semicolon": true, | |
| "block-indent": 4, | |
| "color-case": "lower", | |
| "color-shorthand": true, |