Skip to content

Instantly share code, notes, and snippets.

View gotbahn's full-sized avatar
🐙

Bogdan Plieshka gotbahn

🐙
View GitHub Profile
@gotbahn
gotbahn / index.js
Last active March 31, 2020 11:49
Media Session. Meta Information. Text fields
window.navigator.mediaSession.metadata = new window.MediaMetadata({
title: 'FIS Ski Weltcup Abfahrt der Herren Kvitfjell',
artist: 'Das Rennen',
album: 'ORF1 HD',
});
@gotbahn
gotbahn / font-face.css
Created November 27, 2017 22:04
Font face mixin output
@font-face {
.woot {
font-family: "Name";
font-weight: 400;
font-style: normal;
src: url("static/fonts/name/name_regular.woff2"), url("static/fonts/name/name_regular.woff");
}
}
@font-face {
@gotbahn
gotbahn / font-face.scss
Last active November 27, 2017 23:12
Font face mixin
$fontWeightMap: (
bold: 700,
regular: 400,
italic: 400,
light: 100,
);
@mixin fontFace($fontName, $path: 'static/fonts/') {
$font: to-lower-case($fontName);
@gotbahn
gotbahn / measurement-utility-functions.scss
Created June 28, 2017 20:29
Measurement utility functions
@function toEm($target, $context: $base_font-size) {
@return ($target / $context) * 1em;
}
@function toRem($target) {
@return ($target / 10) * 1rem;
}
@function toPx($target) {
@return $target + px;
@gotbahn
gotbahn / abstract-unitless-values-calculations.scss
Last active June 28, 2017 20:28
Abstract unitless values calculations
$border-size: 1;
$height: 16;
.box {
border: toPx($border-size) solid; // 1px
height: toRem($height - $border-size * 2); // 1rem
}
@gotbahn
gotbahn / abstract-unitless-values.scss
Last active June 28, 2017 20:28
Abstract Unitless Values
$size: 14;
.room {
font-size: toEm($size); // 1em
}
.cat {
height: toRem($size); // 1.4rem
}
@gotbahn
gotbahn / gulpfile.js
Last active September 27, 2016 15:39
0.3 Bump project and push release tag with single command
const fs = require('fs'); // read files
const args = require('yargs').argv; // recognize command arguments
const gulp = require('gulp');
const semver = require('semver');
const bump = require('gulp-bump');
const git = require('gulp-git');
/**
* Bumping version number and tagging the repository with it.
*
@gotbahn
gotbahn / package.json
Last active September 27, 2016 15:42
0.2 Bump project and push release tag with single command
{
"name": "pimp",
"version": "0.0.1",
"description": "...",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-bump": "^2.4.0",
"gulp-git": "^1.11.3",
"yargs": "^5.0.0"
}
@gotbahn
gotbahn / config.js
Last active September 19, 2016 11:46
0.1 Bump project and push release tag with single command
exports.config = {
version: '0.0.1'
};
@gotbahn
gotbahn / package.json
Last active September 27, 2016 15:42
0.0 Bump project and push release tag with single command
{
"name": "pimp",
"version": "0.0.1",
"description": "..."
}