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
# Init Antigen https://github.com/zsh-users/antigen zsh plugin manager | |
source ~/.antigen.zsh | |
# Init Nvm https://github.com/creationix/nvm node version manager | |
export NVM_DIR="$HOME/.nvm" | |
. "/usr/local/opt/nvm/nvm.sh" | |
# Init Pure https://github.com/sindresorhus/pure zsh prompt | |
autoload -U promptinit; promptinit | |
prompt pure |
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
@mixin make-col($ref, $margin, $col, $reverse: false) { | |
$marginSum: $margin*($col - 1); | |
$itemWidth: floor(($ref -$marginSum)/$col); | |
width: percentage($itemWidth/$ref); | |
@if ($reverse == true) { | |
float: right; | |
margin-left: percentage($margin/$ref); | |
&:last-child { | |
margin-left: 0; |
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
data:text/html,<script>i=0;setInterval(function(){i=(i+100)%252000;document.querySelector('div').style.backgroundPositionX='-'+i+'px';},30);</script><div%20style="width:100px;height:100px;background:url(https://goo.gl/6nq9n5)"> |
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
// この実装は$.load()に限りなく近い | |
// http://james.padolsey.com/jquery/#v=2.1.3&fn=jQuery.fn.load | |
// http://stackoverflow.com/questions/16885538/how-to-load-an-html-fragment-with-jquery-ajax | |
$.ajax({ | |
url: 'page.html', | |
dataType: 'html' | |
}).done(responsText => | |
// 空のdiv要素に追加 | |
var $el = $('<div>').append($.parseHTML(responsText)).find('.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
$maxWidth: 1330px | |
$col: 100px/$maxWidth * 100% | |
$margin: 10px/$maxWidth * 100% | |
@mixin col($contentCol:1, $marginCol-left:0, $marginCol-right:0) | |
width: $col*$contentCol + $margin*($contentCol - 1) | |
margin-left: ($col+$margin)*$marginCol-left + $margin | |
margin-right: ($col+$margin)*$marginCol-right + $margin | |
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
{ | |
"name": "sundaycrafts", | |
"age": 18, | |
"gender": "male", | |
"msg": "<h1>Hello World!</h1>" | |
} |
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
<h1>Hello world!</h1> |
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
# get 4 spaces indents(it is not works perfectly but enough) | |
/(?<!\S) {4}/ | |
# erace padding text such as ctrl char when logging bash log by [script] command | |
s/((?![\n\t])[[:cntrl:]])|(\[.*?(m|k))//g |
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
%vCentering { | |
// https://css-tricks.com/centering-in-the-unknown/ | |
text-align: center; | |
white-space: nowrap; | |
overflow-x: hidden; | |
&:before { | |
content: ""; | |
display: inline-block; | |
height: 100%; | |
vertical-align: middle; |
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
$FontSize: 14px; | |
$LineHeight: $FontSize * 1.5; | |
@function getLineHeight($fontSize) { | |
$height: $LineHeight; | |
@while $height < $fontSize { | |
$height: $height + $height; | |
} | |
@return $height; | |
} |
NewerOlder