Skip to content

Instantly share code, notes, and snippets.

View cafuego's full-sized avatar
😢

Peter Lieverdink cafuego

😢
View GitHub Profile
@mattcuro
mattcuro / gist:3244939
Created August 3, 2012 05:58
Unimel file field formatter: large
$formatter = new stdClass();
$formatter->disabled = FALSE; /* Edit this to true to make a default formatter disabled initially */
$formatter->api_version = 2;
$formatter->name = 'unimel_download_large';
$formatter->label = 'unimel download large';
$formatter->description = 'Styles a file field that users can download as per the Unimelb branding.';
$formatter->mode = 'php';
$formatter->field_types = 'file';
$formatter->code = 'foreach ($variables[\'#items\'] as $item) {
$filepath = file_create_url($item[\'uri\']);
@mattcuro
mattcuro / gist:3244937
Created August 3, 2012 05:57
Unimel file field formatter: small
$formatter = new stdClass();
$formatter->disabled = FALSE; /* Edit this to true to make a default formatter disabled initially */
$formatter->api_version = 2;
$formatter->name = 'unimel_download_small';
$formatter->label = 'unimel download small';
$formatter->description = 'Styles a file field that users can download as per the Unimelb branding.';
$formatter->mode = 'php';
$formatter->field_types = 'file';
$formatter->code = 'foreach ($variables[\'#items\'] as $item) {
$filepath = file_create_url($item[\'uri\']);
@garyharan
garyharan / _mixins.scss
Created May 5, 2011 15:46
Useful scss mixins (rounded corners, gradients, text-field, button)
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}