Skip to content

Instantly share code, notes, and snippets.

View jbrooksuk's full-sized avatar

James Brooks jbrooksuk

View GitHub Profile
@jbrooksuk
jbrooksuk / gist:de76b30d4c786d7f672d
Created January 21, 2015 10:00
git-verify-pack
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
82ea11bec90046e3f683dd648106794a60388b7f commit 692 433 2302
@jbrooksuk
jbrooksuk / markdown.css
Created April 10, 2015 16:36 — forked from imjasonh/markdown.css
Ordered list
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@jbrooksuk
jbrooksuk / locker.php
Created June 20, 2016 10:15
AltThree/Locker Usage
<?php
namespace App\Bus\Middleware;
use AltThree\Locker\Locker;
use Closure;
use Illuminate\Contracts\Queue\ShouldQueue;
class LockingMiddleware
{
@jbrooksuk
jbrooksuk / tutorial.md
Created July 17, 2018 09:57 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

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.

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:

<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
class ClientHint
{
@jbrooksuk
jbrooksuk / NovaServiceProvider.php
Created February 18, 2020 12:12
Using Nova::sortResourcesBy
<?php
namespace App\Providers;
use Laravel\Nova\Nova;
use Laravel\Nova\Cards\Help;
use Illuminate\Support\Facades\Gate;
use Laravel\Nova\NovaApplicationServiceProvider;
class NovaServiceProvider extends NovaApplicationServiceProvider
<?php
namespace App\Casts;
use Carbon\Carbon;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
class LocalizedDateTime implements CastsAttributes
{
/**
export default function(originalPromise, delay = 750) {
return Promise.all([
originalPromise,
new Promise(resolve => {
setTimeout(() => resolve(), delay)
}),
]).then(result => result[0])
}
// Usage
{
"name": "Shades of Purple",
"author": "",
"globals": {
"background": "#2D2B55",
"foreground": "#FFFFFF",
"caret": "#FFFFFF",
"block_caret": "#FFFFFF",
"line_highlight": "#1F1F41",
"misspelling": "#EC3A37F5",