Skip to content

Instantly share code, notes, and snippets.

View joonassandell's full-sized avatar

Joonas Sandell joonassandell

View GitHub Profile
@joonassandell
joonassandell / Docker: Commands
Last active January 4, 2017 08:36
Random Docker commands I usually forget
# 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)`
@joonassandell
joonassandell / Rebirth: CSS - Easing
Last active March 23, 2023 16:40
Sass easing configurations (for Rebirth etc.)
// ========================================
// 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);
@joonassandell
joonassandell / Typo3: Partial
Last active November 3, 2016 09:16
Fluid partial
<f:render partial="" arguments="{}" />
@joonassandell
joonassandell / Typo3: Typekit
Last active October 4, 2017 08:14
Fluid TypeKit snippet
<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>
@joonassandell
joonassandell / SassMeister-input.scss
Last active September 14, 2015 12:50 — forked from pascalduez/SassMeister-input.scss
Some Sass string functions: capitalize, ucwords, camelize, ...
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Capitalize string
// --------------------------------------------------------------------------------
// @param [string] $string
// --------------------------------------------------------------------------------
// @return [string]
@joonassandell
joonassandell / Rb: Container
Last active November 3, 2016 09:21
Rebirth Container w/ wrap & grid snippet
<div class="Container">
<div class="Wrap">
<div class="Grid">
<div class="Grid-cell m-Width--6of12">
</div>
</div>
</div>
</div>
@joonassandell
joonassandell / Typo3: Comment
Last active November 3, 2016 09:20
Fluid comment
<f:comment>
</f:comment>
(?:https?:\/\/)?(?:www\.)?youtu(?:.be\/|be\.com\/watch\?v=|be\.com\/v\/)(.{8,})
@joonassandell
joonassandell / JS: Closest number
Last active September 13, 2016 14:38 — forked from vipickering/closestNumberArray.js
Find closest number in ES6
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;
@joonassandell
joonassandell / JS: detect font-face support
Last active September 13, 2016 14:38
Detecting font-face support
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.