Skip to content

Instantly share code, notes, and snippets.

View juukie's full-sized avatar

Jürgen juukie

  • Active Creations
  • Netherlands
View GitHub Profile
<?php
/*
|--------------------------------------------------------------------------
| Other Routes
|--------------------------------------------------------------------------
|
| Routes for the sub-domains
|
*/
<?php
trait Gettable {
/**
* Retrieve private attributes.
* Attributes should be protected
* so they cannot be *set* arbitrarily.
* This allows us to *get* them as if they
* were public.
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
{
"query": {
"function_score": {
"query": {
"bool": {
"must": {
"multi_match": {"query": "Renaissance", "fields": ["name", "company"]},
"term": {"features": "disability_access"},
},
"should": {
@juukie
juukie / gist:723dd8ff9cfa706c1d6d
Created December 18, 2014 12:24
format_filesize
<?php
if ( ! function_exists('format_filesize'))
{
/**
* Formats a filesize in a human readable way.
*
* @param int $size
* @param array $sizes
* @return string
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@juukie
juukie / gist:8327427
Created January 9, 2014 00:40
Little Laravel / Symfony Translation playground
// app/lang/en/global.php
return array(
'apples' => '{0} Zero apples|one: Single apple|more: :count apples',
'beers' => '{0} Drama|Single beer|more: Cheers',
'soup' => '[-Inf,0] No soup|{1,2,5} One, two or five soups|[3,Inf] The amount of soup is :count',
);
// Block Grid
// Technique adapted from Foundation 5 for Bootstrap 3.
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM)
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme)
// https://gist.github.com/Jursdotme/67abe379d4a357233d3c
// https://gist.github.com/juukie/bcd1ef59ba6dd62ce968#file-block-grid-sass
[class*="block-grid-"]
@juukie
juukie / 100-wkhtmltoimage-special.conf
Last active March 20, 2016 11:52
CentOS verbetering font rendering voor PDF
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
@juukie
juukie / copy.js
Created May 11, 2016 20:34 — forked from miguelmota/copy.js
Deep clone copy array with lodash.
var array = [{},{},{}];
var copy = _.map(array, _.clone);