Skip to content

Instantly share code, notes, and snippets.

@mattwells
mattwells / Configuration.h
Last active December 22, 2023 07:50
Marlin 2.0 Config for Ender 3 with E3D Hemera and BLTouch (SD Disabled)
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@mattwells
mattwells / Orphan Finder.sql
Last active August 29, 2015 14:18
Fast query to find orphaned rows
SELECT `id`, COUNT(`id`) as `count`
FROM (
SELECT `id`
FROM `items`
UNION ALL
SELECT `id`
FROM `related`
) AS `union`
GROUP BY `id`
HAVING `count` = 1;
@mattwells
mattwells / User.php
Created February 12, 2015 15:49
Laravel 5 Eloquent Casts
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
class User extends Model {
// ...
/**
* The attributes that should be casted to native types.
@mattwells
mattwells / route.php
Created April 14, 2014 21:45
Nested Routes in Laravel 4
<?php
Route::group(['prefix' => 'forum/{fId}'], function()
{
Route::resource('topic/{tId}', 'TopicController');
});
Route::resource('forum', 'ForumController');
class TopicController extends BaseController
{