Skip to content

Instantly share code, notes, and snippets.

View meigwilym's full-sized avatar

Mei Gwilym meigwilym

View GitHub Profile
@meigwilym
meigwilym / readme.md
Created October 1, 2018 08:30
Configuring WPA2 Wifi on a Raspberry Pi

I had real trouble connecting my Raspberry Pis (v3 Model Bs) to a WPA Enterprise network.

Here's what I did to get it to work.

For this example, my wifi network name is "WiFi Network", usernames and passwords have also been swapped out. The Wifi Country is GB.

Wifi

Edit /etc/wpa_supplicant/wpa_supplicant.conf with the following (using your "real" password):

@meigwilym
meigwilym / readme.md
Last active October 30, 2018 12:26
UK Quake Alerts
@meigwilym
meigwilym / CQRS.md
Last active March 6, 2025 02:48
CQRS, Task Based UIs, Event Sourcing agh!

CQRS, Task Based UIs, Event Sourcing agh!

Posted by gregyoung on February 16, 2010

Many people have been getting confused over what CQRS is. They look at CQRS as being an architecture; it is not. CQRS is a very simple pattern that enables many opportunities for architecture that may otherwise not exist. CQRS is not eventual consistency, it is not eventing, it is not messaging, it is not having separated models for reading and writing, nor is it using event sourcing. I want to take a few paragraphs to describe first exactly what CQRS is and then how it relates to other patterns.

CQRS Command and Query Responsibility Segregation

Starting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).

@meigwilym
meigwilym / index.md
Last active June 26, 2019 16:04
Ultra Pen Llyn 2019 - 80km

Gwefan y ras.

Llwybr y daith.

Mae'r map yn cynnwys Check Points (coch) a Honesty Books (glas).

Dwi'n anelu am 13 awr. Dyma'r check points/amseroedd yn fras:

CP Ble Amser
@meigwilym
meigwilym / readme.md
Last active September 4, 2019 16:07
Notes from Ollie Read's article Laravel multi-tenancy, avoiding over engineering
@meigwilym
meigwilym / index.md
Created November 28, 2019 08:52
Notes on stitcher.io's Laravel beyond CRUD

Laravel beyond CRUD

stitcher.io

A blog series for PHP developers working on larger-than-average Laravel projects

Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.

Chapter 1: Domain oriented Laravel

@meigwilym
meigwilym / AbilitySeeder.php
Last active January 31, 2020 14:39
Using Bouncer to check abilities
<?php
use App\Client;
use App\User;
use App\Site;
use App\Plot;
use App\SalesStatus;
use Silber\Bouncer\BouncerFacade as Bouncer;
use Illuminate\Database\Seeder;
@meigwilym
meigwilym / AbstractDTO.php
Last active November 23, 2022 14:41
An abstract DTO class I've been experimenting with recently.
<?php
namespace App\DTO;
use Illuminate\Support\Str;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
/**
* An abstract class to provide out of the box functionality for DTO objects.