Skip to content

Instantly share code, notes, and snippets.

View Riske's full-sized avatar

Patrik Riske Riske

  • Gothenburg, Sweden
View GitHub Profile
%clearfix {
&:after {
clear: both;
content: '';
display: table;
}
}
// Media module, stolen from http://ianstormtaylor.com/oocss-plus-sass-is-the-best-way-to-css/
@Riske
Riske / index.jade
Last active December 20, 2015 15:28
Base Jade templates for personal usage, based on HTML5 Boilerplate with parts from the foundation templates.
doctype html
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
title
meta(name='description', content='')
@Riske
Riske / Gruntfile.coffee
Last active March 9, 2018 08:57
My Gruntfile
#
# Gruntfile only for my own usage, don't care about others ;)
#
module.exports = (grunt) ->
# Project configuration.
require("matchdep").filterDev("grunt-*").forEach grunt.loadNpmTasks
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
# Minify Javascript.
uglify:
"1-4-2014", "2-4-2014", "3-4-2014", "4-4-2014", "5-4-2014", "6-4-2014", "7-4-2014", "8-4-2014", "9-4-2014", "10-4-2014", "11-4-2014", "12-4-2014", "13-4-2014", "14-4-2014", "16-4-2014", "17-4-2014", "18-4-2014", "19-4-2014", "20-4-2014", "21-4-2014", "22-4-2014", "23-4-2014", "24-4-2014", "25-4-2014", "26-4-2014", "27-4-2014", "28-4-2014", "29-4-2014", "30-4-2014", "1-5-2014", "2-5-2014", "3-5-2014", "4-5-2014", "5-5-2014", "6-5-2014", "7-5-2014", "8-5-2014", "9-5-2014", "10-5-2014"
@Riske
Riske / index.html
Last active August 29, 2015 14:00
Susy-test
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Susy-Test</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="main.css">
</head>
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
# SASS
.sass-cache
*.css.map
# OsX
.DS_Store
.AppleDouble
.LSOverride
## Icon must end with two \r
$element-separator: '__' !default;
$modifier-separator: '--' !default;
@function contains-modifier($selector) {
$selector: selector-to-string($selector);
@if str-index($selector, $modifier-separator) {
@return true;
} @else {
@return false;
}
@Riske
Riske / _decimal.scss
Created October 16, 2015 12:39 — forked from terkel/_decimal.scss
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0