This file contains 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
# Random Docker commands I usually forget | |
**Docker "SSH"** (http://bit.ly/1PMN6MM): | |
`docker exec -it <containerIdOrName> bash` | |
**Remove all containers** | |
`docker rm $(docker ps -aq)` | |
**Stop all containers** | |
`docker stop $(docker ps -a -q)` |
This file contains 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
// ======================================== | |
// Easings | |
// ======================================== | |
$ease-inOut: ease-in-out; | |
$ease-outSine: cubic-bezier(0.39, 0.575, 0.565, 1); | |
$ease-inOutSine: cubic-bezier(0.445, 0.05, 0.55, 0.95); | |
$ease-inQuad: cubic-bezier(0.55, 0.085, 0.68, 0.53); | |
$ease-outQuad: cubic-bezier(0.25, 0.46, 0.45, 0.94); | |
$ease-inOutQuad: cubic-bezier(0.455, 0.03, 0.515, 0.955); |
This file contains 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
<f:render partial="" arguments="{}" /> |
This file contains 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
<v:asset.prefetch domains="use.typekit.net" /> | |
<v:asset.script path="myscript.js" external="true" standalone="true" movable="false" /> | |
<v:asset.script external="true" standalone="true" movable="false">try{Typekit.load({ async: true });}catch(e){}</v:asset.script> |
This file contains 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
// ---- | |
// Sass (v3.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Capitalize string | |
// -------------------------------------------------------------------------------- | |
// @param [string] $string | |
// -------------------------------------------------------------------------------- | |
// @return [string] |
This file contains 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
<div class="Container"> | |
<div class="Wrap"> | |
<div class="Grid"> | |
<div class="Grid-cell m-Width--6of12"> | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains 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
<f:comment> | |
</f:comment> |
This file contains 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?:\/\/)?(?:www\.)?youtu(?:.be\/|be\.com\/watch\?v=|be\.com\/v\/)(.{8,}) |
This file contains 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
const closestNumber = (array, num) => { | |
const i = 0; | |
let minDiff = 1000; | |
let ans; | |
for (i in array){ | |
const m = Math.abs(num - array[i]); | |
if (m < minDiff) { | |
minDiff = m; |
This file contains 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 ua = navigator.userAgent, | |
doc = document, | |
docEl = doc.documentElement; | |
/** | |
* Detect mobile "font-face" support | |
* | |
* Doesn't check support on desktop browsers | |
* so you should use Modernizr in combination with this | |
* UA detection to get the most out of it. |