git config --global core.quotepath 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
open -a Firefox | |
open -a Safari | |
open -a Google\ Chrome |
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 total = 0, | |
num = 0, | |
ave, | |
i; | |
for (i = 1; i <= 10; i++) { | |
total += i; | |
num++; | |
} |
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 newCounter() { | |
var i = 0; | |
return function() { | |
i = i + 1; | |
return i; | |
} | |
} | |
var c1 = newCounter(); | |
var c2 = newCounter(); | |
console.log(c1()); // 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
// Cache the querySelector/All for easier and faster reuse | |
window.$ = document.querySelectorAll.bind(document); | |
window.$$ = document.querySelector.bind(document); | |
// Get element(s) by CSS selector: | |
window.qs = function (selector, scope) { | |
return (scope || document).querySelector(selector); | |
}; | |
window.qsa = function (selector, scope) { | |
return (scope || document).querySelectorAll(selector); |
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
.pannel { | |
display: block; | |
position: relative; | |
width: 100%; | |
&:before { | |
content: ""; | |
display: block; | |
padding-top: 50%; | |
} |
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
.posts { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
/* 上書きする例(bad) */ | |
.post { | |
border-bottom: 1px solid #eee; |
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
# Dockerで<none>なイメージを一括で削除するワンライナー | |
# not danglingなimageを全て削除 | |
docker image prune | |
# not danglingなcontainer, volume, network,imageを全て削除 | |
docker system prune |
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
@-moz-document url-prefix() { | |
select { | |
-moz-appearance: none; | |
text-indent: 0.01px; | |
text-overflow: ""; | |
} | |
} |
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
// https://coderwall.com/p/0iz_zq/how-to-put-focus-at-the-end-of-an-input-with-react-js | |
moveCaretAtEnd(e) { | |
var temp_value = e.target.value | |
e.target.value = '' | |
e.target.value = temp_value | |
} | |
render() { | |
<textarea |