Skip to content

Instantly share code, notes, and snippets.

/*
This script uses the sys_getloadavg() function
to lock out some visitors in cases of extreme load.
$threads defines the maximum avaialable count of php threads
to aproximate a representation of the stresslevel.
A good value is the number of cpu threads available to php.
by malte buttjer
buttjer.net
@buttjer
buttjer / vendormixin.sass
Last active December 11, 2015 18:38
Simple universal Vendor SASS Mixin. Example: @include vendor(-prefix- transition, -prefix- transform 0.2s ease-in-out );
@mixin vendor($name, $args...) {
$vendors: -webkit-, -ms-, -moz-, -o-;
$nextWithVendor: false;
$first: true;
$cleanValues: null;
$cleanName: $name;
@if nth( $name, 1 ) == -prefix- {
$cleanName: nth( $name, 2 );
}