Skip to content

Instantly share code, notes, and snippets.

View aranw's full-sized avatar

Aran Wilkinson aranw

View GitHub Profile
Exception
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'token' in 'where clause' (SQL: select * from `users` where `token` = ? and `email` = ? limit 1) (Bindings: array ( 0 => '', 1 => '', ))
aran@Arans-MacBook-Pro ~/Sites/fyi/web ±develop » composer update
PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::redirectIfTrailingSlash() in /Users/aran/Sites/fyi/web/bootstrap/start.php on line 16
PHP Stack trace:
PHP 1. {main}() /Users/aran/Sites/fyi/web/artisan:0
PHP 2. require_once() /Users/aran/Sites/fyi/web/artisan:30
Fatal error: Call to undefined method Illuminate\Foundation\Application::redirectIfTrailingSlash() in /Users/aran/Sites/fyi/web/bootstrap/start.php on line 16
Call Stack:
0.0002 233384 1. {main}() /Users/aran/Sites/fyi/web/artisan:0
<?php
if (perch_get('s')) {
$post = array(
'filter' => 'slug',
'sort-order' => 'DESC',
'count' => 1,
'template' => 'blog/listing.html'
);
} else {
$post = array(
<?php
$posts = DB::table('posts')
->join('image_post', 'posts.id', '=', 'image_post.post_id')
->join('images', 'image_post.image_id', '=', 'images.id')
->join('artist_post', 'posts.id', '=', 'artist_post.post_id')
->join('artists', 'artist_post.artist_id', '=', 'artists.id')
->where('posts.category', '!=', 'news')
->where('posts.status', '=', 'published')
->order_by('posts.created_at', 'desc')
->distinct()
@aranw
aranw / gist:4966583
Last active December 13, 2015 19:58
Is this the correct way to do BEM? Or should I separate the header from the featured?
<section class="featured">
<header class="featured__header">
<h1 class="featured__header__title">Venue of the week</h1>
</header>
</section>
<?php namespace PatrickMaciel;
class BaseController extends \Controller {
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
@aranw
aranw / gist:4600205
Created January 23, 2013 00:06
Vagrant Puppet Config
# Basic Puppet manifest
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] }
class system-update {
file { "/etc/apt/sources.list.d/dotdeb.list":
owner => root,
group => root,
mode => 664,
@aranw
aranw / gist:4600183
Created January 23, 2013 00:04
MySQL Puppet Error
err: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install mysql-server' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libnet-daemon-perl libplrpc-perl mysql-client-5.5 mysql-client-core-5.5
mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
libipc-sharedcache-perl libterm-readkey-perl tinyca mailx
The following NEW packages will be installed:
@aranw
aranw / gist:4258305
Created December 11, 2012 12:45
Github Status Graphing JS
(function() {
$(function() {
var render, renderGraphs;
render = function(data, canvas) {
var add_gradient, area, bad_at, dateEnd, dateStart, daySpan, format, gradient, h, line, lines, main_path, max, min, numdays, padb, padl, padr, padt, subs, ticks, timeFormat, transition, units, vis, w, warn_at, x, xAxis, y, yAxis, yax, _ref;
w = canvas.width();
h = canvas.height();
units = canvas.attr('data-unit');
add_gradient = canvas.attr('data-warn-at') != null;
@aranw
aranw / gist:4189982
Created December 2, 2012 17:18
CSS BEM
<article class="post">
<h2 class="post__header"><a href="" class="post__header--link">title</a></h2>