Skip to content

Instantly share code, notes, and snippets.

View matthiasmoier's full-sized avatar

Matthias Moier matthiasmoier

View GitHub Profile
@matthiasmoier
matthiasmoier / dl-file.php
Created November 27, 2018 15:35 — forked from hakre/dl-file.php
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@matthiasmoier
matthiasmoier / _decimal.scss
Created November 26, 2016 00:36 — 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
@matthiasmoier
matthiasmoier / Colored-link-underline.markdown
Created October 2, 2014 19:58
A Pen by Matthias Meier.