Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

James Brooks jbrooksuk

🌴
On vacation
Block or report user

Report or block jbrooksuk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ClientHint.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
class ClientHint
{
View keybase.md

Keybase proof

I hereby claim:

  • I am jbrooksuk on github.
  • I am jbrooksuk (https://keybase.io/jbrooksuk) on keybase.
  • I have a public key ASAp_2hQIcctZIJ40mfPcsvxSxEbrCG141FYiZYI10wqdAo

To claim this, I am signing this object:

@jbrooksuk
jbrooksuk / tutorial.md
Created Jul 17, 2018 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API
View tutorial.md

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@jbrooksuk
jbrooksuk / locker.php
Created Jun 20, 2016
AltThree/Locker Usage
View locker.php
<?php
namespace App\Bus\Middleware;
use AltThree\Locker\Locker;
use Closure;
use Illuminate\Contracts\Queue\ShouldQueue;
class LockingMiddleware
{
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
View gist:de76b30d4c786d7f672d
This file has been truncated, but you can view the full file.
4d390885d709f97385ec581cf17c05852a3850d1 commit 400 267 12
486f8def9e531b3461b38292acc39e15db2dc077 commit 257 174 279
a7b22305c49c038b4ea791069d9dddbdd1f4842c commit 447 299 453
ebe2e27f9ddcb1d7cc7f94c4cf62219bb6dd51ac commit 442 298 752
1bf05c78baa46c8551e6899514f10916365db585 commit 545 355 1050
8f3f3792b039f2521af5389e5f5495bba1e790fe commit 301 206 1405
6a7a950042c0d4d3aed457671228898e782a5c6f commit 236 161 1611
7a7c98a05cbf6ea85fb9cd16eef0f74f41cfd091 commit 378 250 1772
a977d063a0335723d1a649bc0097bfade20f45ad commit 439 280 2022
View sym-default.sublime-theme
{
"class": "icon_folder_dup",
"layer0.texture": "Theme - Default/icons/folder_dup.png",
"layer0.opacity": 1.0,
"content_margin": [8, 8]
}
View index.js
var https = require('https');
var Notification = require('node-notifier');
var CronJob = require('cron').CronJob;
var storesUrl = 'https://reserve.cdn-apple.com/GB/en_GB/reserve/iPhone/stores.json';
var stockUrl = 'https://reserve.cdn-apple.com/GB/en_GB/reserve/iPhone/availability.json';
var stockLastUpdated;
var stores;
View serializeObject.js
$.fn.serializeObject = function() {
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
View slow.php
<?php
private function loadQuotes() {
$this->comment('Loading quotes...');
$hFile = fopen($this->store . 'quotes.csv', 'r');
$progress = $this->getHelperSet()->get('progress');
$progress->setFormat($progress::FORMAT_VERBOSE_NOMAX);
$progress->start($this->getOutput());
You can’t perform that action at this time.