Skip to content

Instantly share code, notes, and snippets.

View scrummitch's full-sized avatar
🚝
Mono!

Mitch scrummitch

🚝
Mono!
View GitHub Profile
<?php
$routes = collect(app('router')->getRoutes())
->groupBy(fn (\Illuminate\Routing\Route $route) => $route->getPrefix())
->reject(fn ($route, $prefix) => in_array($prefix, ['_ignition', 'sanctum']));
$routes->put('web', $routes->pull(''));
$webRoutes = $routes
->get('web')
->groupBy(fn (\Illuminate\Routing\Route $route) => \Illuminate\Support\Str::before($route->getAction('controller'), '@'))
@scrummitch
scrummitch / free_email_provider_domains.txt
Created February 19, 2022 01:27 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@scrummitch
scrummitch / machine.js
Created February 10, 2021 21:54
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
<?php
function page($page = 1) {
$request = (new \GuzzleHttp\Client())
->get('https://api.github.com/repos/user/repo/pulls', [
'auth' => ['username', 'password'],
'headers' => [
'User-Agent' => 'CSV export',
'Accept' => 'application/vnd.github.v3+json',
],
@scrummitch
scrummitch / TestCase.php
Created November 5, 2015 00:11
Model Testcase that is slow
<?php
/**
* @codeCoverageIgnoreStart
*/
class Unittest_Model_TestCase extends Unittest_Database_TestCase {
// Set the Unit Test database connection for our ORM calls
public static function setUpBeforeClass()
{
Database::$default = Kohana::$config->load('unittest.db_connection');
@scrummitch
scrummitch / github-csv-export.php
Last active August 29, 2015 14:26
Export github issues in your repo to a csv. Using kohana request library
<?php
$pages = 1;
function req($page = 1)
{
$request = Request::factory('https://api.github.com/repos/ORGANISATION/REPOSITORY/issues')
->headers('Authorization', 'Basic '.base64_encode('USERNAME:PASSWORD'))
->headers('User-Agent', 'CSV export')
->query([