Skip to content

Instantly share code, notes, and snippets.

View jeffturcotte's full-sized avatar

Jeff Turcotte jeffturcotte

View GitHub Profile
@jeffturcotte
jeffturcotte / Install.sh
Created March 19, 2018 19:20
Laravel Mix / Echo Server / Docker / Traefik Examples
# clone repo
git clone https://github.com/imarc/laravel-echo-example
cd laravel-echo-example
# install php dependencies
composer install
composer run-script install-tasks
# install npm dependencies and build
npm install

Keybase proof

I hereby claim:

  • I am jeffturcotte on github.
  • I am jeffturcotte (https://keybase.io/jeffturcotte) on keybase.
  • I have a public key ASA0SppfmcWq8sF9QAgJgAsuHzGUJWqCDD-IdaBTqA6xtgo

To claim this, I am signing this object:

@jeffturcotte
jeffturcotte / Exclamation.php
Last active April 18, 2019 15:09
Exclamation class
<?php
class Exclamation
{
private static $exclamations = [
'TIGHTSKI!',
'HOLY SMOKES!',
'HOLY MOLY!',
'GOOD GOLLY!',
'GREAT GOOGELY MOOGELY!',
'SWEET JEEZ!',
@jeffturcotte
jeffturcotte / functions.sh
Last active August 29, 2015 14:04
Helpful Bash Functions
#!/bin/bash
function copyfacl() {
getfacl $1 | setfacl --set-file=- $2
}
@jeffturcotte
jeffturcotte / hamburgers.txt
Created May 6, 2014 15:01
Hamburger Taste Test
hamburgers.txt
Seventeen State Street
Five Guys
The Port Tavern
Lexi's
Loretta's
Port City
@jeffturcotte
jeffturcotte / init.php
Created March 26, 2014 22:03
Handlebars context helper concept
<?php
include 'vendor/autoload.php';
use Handlebars\Handlebars;
use Handlebars\Helpers;
use Handlebars\Loader\FilesystemLoader;
$helpers = new Helpers();
$helpers->add('data', function($template, $context, $args, $source) {
@jeffturcotte
jeffturcotte / gist:9692230
Created March 21, 2014 18:12
Trait Usage
<?php
class Word {}
class NotAWord { }
trait SayTrait {
function say(Word $word) {
echo 'word?';
}
}
@jeffturcotte
jeffturcotte / gist:9557854
Last active August 29, 2015 13:57
Injector register method
<?php
/**
* Register a dependency. The following formats are allowed:
*
* 1. Fully qualified class (or interface) name with factory closure:
* $injector->register('Fully\Qualified\ClassName', function { .... });
*
* 2. Fully qualified class (or interface) name with instance of said class:
* $injector->register('Fully\Qualified\ClassName', $instance);
*
@jeffturcotte
jeffturcotte / Template.html
Last active December 27, 2016 12:03
RequireJS per page module
<!doctype html>
<html>
<head>
<title>{{ title|title }}</title>
<link rel="stylesheet" href="/styles/common.css" />
<link rel="stylesheet" href="/styles/layout.css" />
</head>
<body>
{{ include('header.html') }}
@jeffturcotte
jeffturcotte / gist:7414813
Created November 11, 2013 15:21
device pixel ratio media query
#logo {
background-image: url('/images/my_image.png');
}
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
#logo {
background-image: url('/images/my_image@2x.png');
background-size: 200px 100px;
}
}