Skip to content

Instantly share code, notes, and snippets.

View simonyeldon's full-sized avatar

Simon Yeldon simonyeldon

View GitHub Profile
<?xml version="1.0" encoding="utf-8" ?> <rss version="2.0" xml:base="https://test-5809-pzul54ufcegdm.bc.platform.sh/en" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss"> <channel> <title>English schools</title>
<description>France</description>
<link>https://test-5809-pzul54ufcegdm.bc.platform.sh/en</link>
<atom:link rel="self" href="https://test-5809-pzul54ufcegdm.bc.platform.sh/en/georss/english-schools.xml/444" />
<ttl>1</ttl>
<item> <title>Marseille</title>
<link>https://test-5809-pzul54ufcegdm.bc.platform.sh/en/english/schools/marseille</link>
<description>&lt;div&gt;521 Avenue du Prado, 13008 Marseille &lt;/div&gt;
&lt;div&gt;01 49 55 73 00&lt;/div&gt;

Mutation

mutation AddPage(
    $language: String
    $type: String
    $title: String
    $slug: String
    $imgUrl: String
    $imgUuid: String

Plex Lets Encrypt Automatic Cron

Take a certificate from Lets Encrypt and turn it into a pfx file for Plex to use.

Change the variables CERT_LOCATION and PLEX_LOCATION to the correct paths.

This creates a certificate without a password. If you want to add one, change the cron on line 12, adding your password directly after pass:.

Place this file in the /etc/cron.daily folder to run it each night.

@simonyeldon
simonyeldon / mac-windows-boot.md
Last active February 2, 2023 10:13
Create windows boot USB on mac

Instructions based mostly from this article, but with the diskutil command modified.

 brew install wimlib
 
 diskutil eraseDisk MS-DOS "WIN10" MBR /dev/disk5
 
 rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-GB_DV9/* /Volumes/WIN10
 
 wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-GB_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800
@simonyeldon
simonyeldon / LambdaNextJSTerraform.md
Created September 11, 2023 13:40
Run a NextJS app in a Lambda, with Terraform
resource "aws_lambda_function" "nextjs_lambda" {  
  filename         = var.standalone_zip
  function_name    = "nextjs-lambda"
  role             = aws_iam_role.nextjs_lambda_role.arn
  handler          = "run.sh"
  runtime          = "nodejs16.x"
  architectures    = ["x86_64"]
  source_code_hash = filebase64sha256(var.standalone_zip)
  layers = [