Skip to content

Instantly share code, notes, and snippets.

View jonnybarnes's full-sized avatar
:octocat:

Jonny Barnes jonnybarnes

:octocat:
View GitHub Profile
javascript:%28function%28%29%7B%20%20var%20t%3Btry%7Bt%3D%28%28window.getSelection%26%26window.getSelection%28%29%29%7C%7C%28document.getSelection%26%26document.getSelection%28%29%29%7C%7C%28document.selection%26%26document.selection.createRange%26%26document.selection.createRange%28%29.text%29%29%3B%7Dcatch%28e%29%7Bt%3D%22%22%3B%7D%3B%20%20window.location%3D%22https%3A%2F%2Fquill.p3k.io%2Fbookmark%3Furl%3D%22%2BencodeURIComponent%28window.location.href%29%2B%22%26content%3D%22%2BencodeURIComponent%28%28t%20%3D%3D%20%27%27%20%3F%20%27%27%20%3A%20%27%22%27%2Bt%2B%27%22%27%29%29%2B%22%26name%3D%22%2BencodeURIComponent%28document.title%29%2B%22%26token%3Dey...3w%22%3B%7D%29%28%29%3B
@jonnybarnes
jonnybarnes / readme.md
Created August 7, 2017 19:03
Firefox Nightly logo

I have a 128x128 .png of the new logo.

Here’s my ~/.local/share/applications/firefox-nightly.desktop:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Firefox Nightly
Comment=Browse the Internet (Nightly)
@jonnybarnes
jonnybarnes / 1-README.md
Last active June 17, 2017 11:48
Mapbox Issues

My workflow is to write es6, and use webpack to bundle and transpile down to es5 with babel.

In the case of wanting static maps on a page. I have a maps.js file, which is a target of my webpack config.

This maps.js file looks for all .map divs and runs an addMap() function on them. This is defined inside a mapbox-utils.js file.

It starts with various helper functions, then there is the actual addMap() function.

Hopefully you can work out what I’m doing.

{
"type": [
"h-entry"
],
"properties": {
"published": [
"2017-01-01 12:00:00"
],
"checkin": {
"type": [

Keybase proof

I hereby claim:

  • I am jonnybarnes on github.
  • I am jonnybarnes (https://keybase.io/jonnybarnes) on keybase.
  • I have a public key whose fingerprint is 8419 B5A1 D884 CAF4 B0AF 8FB3 1B2C 76AF B16C 859B

To claim this, I am signing this object:

@jonnybarnes
jonnybarnes / # imagemagick - 2016-07-12_14-41-04.txt
Created July 12, 2016 14:20
imagemagick on Mac OS X 10.11.5 - Homebrew build logs
Homebrew build logs for imagemagick on Mac OS X 10.11.5
Build date: 2016-07-12 14:41:04
<?php
namespace App\Tests;
use TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExampleTest extends TestCase
@jonnybarnes
jonnybarnes / Client.php
Last active February 8, 2016 23:00
Use arrays for slightly better caching in indieauth-client-php
<?php
namespace IndieAuth;
use BarnabyWalters\Mf2;
class Client {
private static $_headers = array(); //if you bump requirement to php5.4 we could use short syntax
private static $_body = array();
//skip some code
@jonnybarnes
jonnybarnes / server.log
Created October 10, 2015 15:52
Postgres syntax error
ERROR: missing FROM-clause entry for table "places" at character 639
STATEMENT: select * from (
select *,
('3959' * acos( cos( radians('53.49') ) * cos( radians( places.lat ) )
* cos( radians( places.lng ) - radians('-2.38') )
+ sin( radians('53.49') ) * sin( radians( places.lat ) ) ) ) AS distance
from (
select *
from places
where places.lat between 53.475527714192 and 53.504472285808
<?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
{