Skip to content

Instantly share code, notes, and snippets.

View jonnybarnes's full-sized avatar
:octocat:

Jonny Barnes jonnybarnes

:octocat:
View GitHub Profile
@jonnybarnes
jonnybarnes / gist:cb5fb6e1aa91450e5dab
Created August 13, 2014 13:43
Authorship test markup, Joe Bloggs replying to Billy, so this would be HTML found on joebloggs.com
<!doctype html>
<head>
<meta charset="utf-8">
<title>Test Reply</title>
</head>
<body>
<header>
<a rel="author" href="#">Joe Bloggs</a>
</header>
<div class="h-entry">
<?php
$mf2 = new \Mf2\Parser($html, $url);
$rels = $mf2->parseRelsAndAlternates();
if(array_key_exists('webmention', $rels[0])) {
$endpoint = $rels[0]['webmention'][0];
} elseif(array_key_exists('http://webmention.org/', $rels[0])) {
$endpoint = $rels[0]['http://webmention.org/'][0];
}
if($endpoint) {
@jonnybarnes
jonnybarnes / npm-debug.log
Created September 20, 2014 18:36
npm debug log
This file has been truncated, but you can view the full file.
2001 verbose tar unpack /Users/jonny/.npm/qs/1.2.2/package.tgz
2002 silly lockFile 283ea67d--modules-request-node-modules-qs tar:///usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request/node_modules/qs
2003 verbose lock tar:///usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request/node_modules/qs /Users/jonny/.npm/283ea67d--modules-request-node-modules-qs.lock
2004 silly lockFile 2c82295d-s-jonny-npm-qs-1-2-2-package-tgz tar:///Users/jonny/.npm/qs/1.2.2/package.tgz
2005 verbose lock tar:///Users/jonny/.npm/qs/1.2.2/package.tgz /Users/jonny/.npm/2c82295d-s-jonny-npm-qs-1-2-2-package-tgz.lock
2006 silly gentlyRm quitting because other entries in /usr/local/lib/node_modules/npm-registry-client/node_modules/request/node_modules
2007 verbose tar unpack /Users/jonny/.npm/mime-types/1.0.2/package.tgz
2008 silly lockFile 79d52da8--request-node-modules-mime-types tar:///usr/local/lib/node_modules/npm-registry-client/node_modules/request/node_modules/mime-typ
{
"config": {},
"repositories: {
"packagist": { "url": "https://packagist.org", "type": "composer" }
}
}
@jonnybarnes
jonnybarnes / config.xml
Created November 5, 2014 15:15
EPL kits for FM15
<record>
<!-- resource manager options -->
<!-- dont preload anything in this folder -->
<boolean id="preload" value="false"/>
<!-- turn off auto mapping -->
<boolean id="amap" value="false"/>
<!-- logo mappings -->
@jonnybarnes
jonnybarnes / nightly.log
Created November 11, 2014 01:37
the crash report from force quiting nightly
This file has been truncated, but you can view the full file.
Date/Time: 2014-11-11 01:26:53 +0000
OS Version: 10.10 (Build 14A389)
Architecture: x86_64
Report Version: 21
Command: Nightly
Path: /Applications/FirefoxNightly.app/Contents/MacOS/firefox
Version: 36.0a1 (3614.11.10)
Parent: launchd [1]
PID: 27214
@jonnybarnes
jonnybarnes / page.blade.php
Created November 20, 2014 15:45
avoid array to string conversion
//stuff
<ul>
@foreach($data as $key => $value)
<li>{{ $key }}: <?php if(is_array($value)) { echo '<ul>'; foreach($value as $scope) { echo "<li>$scope</li>"; } echo '</ul>'; } else { echo $value; }; ?></li>
@endforeach
</ul>
@jonnybarnes
jonnybarnes / gist:180e1c72c2da39b3c777
Created January 28, 2015 14:12
setting up luks on a new partition
loadkeys uk
lsblk
gdisk /dev/sda
outout should eventually look like:
Command (? for help): p
Disk /dev/sda:
Logical sector size: 512 bytes
Disk identifier (GUID):
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is
@jonnybarnes
jonnybarnes / PKGBUILD
Last active August 29, 2015 14:18
AUR scripts for jbreams/gonepass
pkgname=gonepass-git
pkgver=r22.0931c63
pkgrel=1
pkgdesc='A GTK+ 1Password viewer'
arch=('x86_64')
licence=('Apache2')
url='https://github.com/jbreams/gonepass'
install=$pkgname.install
depends=('gtk3'
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Contrller;
use Illuminate\Http\Request as LaraRequest;
use GuzzleHttp\Psr7\Request as GuzzleRequest;
class FooController extends Controller
{