Skip to content

Instantly share code, notes, and snippets.

@jenofdoom
jenofdoom / _mixins.scss
Created December 5, 2018 03:19
Modern browsers webfont mixin
// update paths as needed if /fonts/ is not right for your site
@mixin font-face($fontname, $filename: $fontname, $weight: normal, $style: normal) {
@font-face {
font-family: $fontname;
src: url('/fonts/#{$filename}.woff2') format('woff2'),
url('/fonts/#{$filename}.woff') format('woff');
font-weight: $weight;
font-style: $style;
}
@jenofdoom
jenofdoom / gulpfile.js
Created January 7, 2016 02:28
gulp-scss-compile
// Include gulp
var gulp = require('gulp');
// Polyfill so we don't need >= node 0.12
require('es6-promise').polyfill();
// Include plugins
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
@jenofdoom
jenofdoom / training-room-install-node-0.10
Last active August 30, 2015 01:47
training room install node and bower
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
sudo npm install -g bower
sudo chown -R $(whoami) ~/.npm
@jenofdoom
jenofdoom / less-font-squirrel-mixin
Created February 11, 2015 22:14
less-font-squirrel-mixin
// font families!
.font-face(@fontname; @filename: @fontname; @weight: normal; @style: normal) {
// based on font squirrel output, without SVG (too legacy)
@font-face {
font-family: @fontname;
src:url('../fonts/@{filename}.eot');
src:url('../fonts/@{filename}.eot?#iefix') format('embedded-opentype'),
url('../fonts/@{filename}.woff2') format('woff2'),
url('../fonts/@{filename}.woff') format('woff'),
url('../fonts/@{filename}.ttf') format('truetype');
@jenofdoom
jenofdoom / font-squirrel-mixin
Created January 7, 2015 03:12
SCSS mixin for font squirrel font import
// font families!
@mixin font-face($fontname, $filename: $fontname, $weight: normal, $style: normal) {
// based on font squirrel output, without SVG (too legacy)
@font-face {
font-family: $fontname;
src:url('../fonts/#{$filename}.eot');
src:url('../fonts/#{$filename}.eot?#iefix') format('embedded-opentype'),
url('../fonts/#{$filename}.woff2') format('woff2'),
url('../fonts/#{$filename}.woff') format('woff'),
url('../fonts/#{$filename}.ttf') format('truetype');