Skip to content

Instantly share code, notes, and snippets.

View davidpeach's full-sized avatar
🖥️
I use Arch btw

David Peach davidpeach

🖥️
I use Arch btw
View GitHub Profile
#cloud-config
packages:
- nginx
#jq is a command-line json processor https://stedolan.github.io/jq/
- jq
- unattended-upgrades
runcmd:
- export DOMAIN=your_domain_here.com
- export DO_API_TOKEN=PASTE_YOUR_DIGITALOCEAN_API_TOKEN_HERE
- export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)
@davidpeach
davidpeach / laravel-ci.yml
Created September 13, 2022 10:45
Github Actions CI file to run Pint, Larastan and Tests in parallel
name: Laravel
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
jobs:
setup:
@davidpeach
davidpeach / t490-arch-install-steps.sh
Created September 19, 2023 13:47
T490 arch install steps
# These are the steps I take to install a fresh copy of Arch Linux on to a Lenovo Thinkpad T490
# Spec: i7; 40gb RAM;
# This will go from the very start up to having a base installation ready to add you chosen window manager or desktop environment.
# Make a bootable usb stick with the latest version of Arch Linux on.
# Plug to into computer and boot.
# Connecting to Internet (wifi)
iwctl device list
library("tidyverse")
data <- read.csv("props.csv")
data %>%
filter(Semi_Detached_Average_Price < 200000) %>%
filter(Semi_Detached_Average_Price > 180000) %>%
filter(
Region_Name == "Warwickshire" |
Region_Name == "Staffordshire" |
Region_Name == "London"
) %>%
use DavidPeach\Fluid\MyProcessor;
require_once '../vendor/autoload.php';
$process = new MyProcessor(10);
@davidpeach
davidpeach / Installation.sh
Last active June 5, 2023 17:37
Arch Linux Installation on EFI laptop (Thinkpad T470)
# These are the steps I take to install a fresh copy of Arch Linux on to my Lenovo Thinkpad T470
# Spec: i5; 16gb RAM; Integrated Intel 620 graphics; SSD;
# This will go from the very start up to having a base installation ready to add you chosen window manager or desktop environment.
# Make a bootable usb stick with the latest version of Arch Linux on.
# Plug to into computer and boot.
# Connecting to Internet (wifi)
iwctl device list
@davidpeach
davidpeach / laravel-ci.yml
Created January 12, 2023 12:13
My default CI workflow yaml for Laravel projects
name: Tests
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
jobs:
setup:
@davidpeach
davidpeach / web.phpstormtest.php
Created December 17, 2021 16:17
Creating a gist from PHP Storm
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
# When hitting the websocket endpoint, the key generated seems to often get messed up.
# Sometimes like this:
883a ff42 4864 0162 8659 a29b 3900 73e4
3fff 9634 11dd 4285 fefc 3d4a ff63 6fd5
# More often like this:
³B1¿Ç?Àam¢å¡öY9ì©zŒ uö1ve‹…µ
<?php
namespace Tests\Feature;
use App\Models\Post;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;