Skip to content

Instantly share code, notes, and snippets.

View ttomdewit's full-sized avatar

Tom de Wit ttomdewit

View GitHub Profile
@ttomdewit
ttomdewit / single-claims.php
Created June 28, 2015 13:55
This is at the bottom of single-claims.php, getting all data from an invoice
<?php
$invoice_fields = get_fields($fields['cla_fac_factuur'][0]);
$inv_customer = array(
'first_name' => $invoice_fields['inv_klant_voornaam'],
'last_name' => $invoice_fields['inv_klant_achternaam'],
'email' => $invoice_fields['inv_klant_email'],
'company_name' => $invoice_fields['inv_klant_bedrijfsnaam'],
'street_number' => $invoice_fields['inv_klant_straat_huisnummer'],
'zipcode' => $invoice_fields['inv_klant_postcode'],
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
{
"bold_folder_labels": true,
"close_windows_when_empty": false,
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"draw_indent_guides": true,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
/**
* Main Gulp file
*
* This main Gulp file imports all modules and
* creates all Gulp tasks accordingly.
*
* Table of contents
* 1) Load plugins
* 2) Styles
* 3) Scripts
function photoswipe(gallerySelector) {
function parseElements(el) {
var elements = $(el).children('.gallery__item'),
numberOfElements = elements.length,
items = [],
slideElement,
linkElement,
size,
item;
<div class="container">
<div class="row">
<div class="col-full col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="gallery | js-gallery">
<figure class="gallery__item | js-gallery-item"><a href="http://lorempixel.com/1200/800/sports/1" data-size="1200x800"><img src="http://lorempixel.com/1200/800/sports/1" /></a></figure>
<figure class="gallery__item | js-gallery-item"><a href="http://lorempixel.com/1200/800/sports/2" data-size="1200x800"><img src="http://lorempixel.com/1200/800/sports/2" /></a></figure>
</div><!-- /.gallery -->
<div class="gallery gallery--nav | js-gallery-nav">
<div class="gallery__item gallery__item--nav" style="background-image: url('http://lorempixel.com/300/200/sports/1');"></div><!-- /.gallery__item -->
@ttomdewit
ttomdewit / CacheBuster.php
Created January 5, 2017 09:44
Trait for busting cache based on Eloquent events
<?php
namespace App\Traits;
use Illuminate\Support\Facades\Cache;
trait CacheBuster
{
public static function bootCacheBuster()
{