Skip to content

Instantly share code, notes, and snippets.

View suburbanworrier's full-sized avatar

Matt Bracewell suburbanworrier

  • Derbyshire, UK
  • 21:35 (UTC +01:00)
View GitHub Profile
@Vigrond
Vigrond / jellyfinchromecast.md
Last active April 20, 2024 18:31
Jellyfin with Chromecast
@gtallen1187
gtallen1187 / keybase-gpg-github.md
Created November 8, 2021 05:15
Using Keybase PGP key with GitHub

Set up Keybase.io, GPG & Git to sign commits on GitHub

This is a step-by-step guide on how to create a GPG key on keybase.io, adding it to a local GPG setup and use it with Git and GitHub.

Although this guide was written for macOS, most commands should work in other operating systems as well.

There's a video published by Timothy Miller explaining some parts of this guide. Discussion on Hacker News.

Note: If you don't want to use Keybase.io, follow [this guide][1] instead. For manually transferring keys to different hosts, check out this [answer on Stack Overflow][2].

@branflake2267
branflake2267 / main.dart
Last active June 8, 2020 14:36
Flutter - Upgrading to Dart 2, JSON & Casting
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@jvenator
jvenator / gist:9672772a631c117da151
Last active April 28, 2024 01:09
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

@crazed
crazed / gist:7670423
Last active September 7, 2023 22:20
getting a moto x back to stock on mac os x
  1. grab the moto-fastboot version of fastboot here

  2. grab the appropriate stock firmware here (tip: you want the one that matches your android build number in settings -> about phone)

  3. unzip this file somewhere and make it easy to run the moto-fastboot-osx64 command from step 1

  4. get your phone into fastboot mode, google it if needed but just power the phone off, hold the down volume key and power button for 3 seconds then let go, should get you there

  5. verify you are ready for flashing:

     ./moto-fastboot-osx64 devices
     -- should list a device --
    
  6. most of the time you just need to flash system and recovery images, so from your unzipped stock firmware files do this:

@danielrbradley
danielrbradley / uk-number-plate-validation.md
Last active April 27, 2024 14:04
Regular Expression to Validate UK Number Plates

Regular Expression to Validate UK Number Plates

Regular Expression

(?<Current>^[A-Z]{2}[0-9]{2}[A-Z]{3}$)|(?<Prefix>^[A-Z][0-9]{1,3}[A-Z]{3}$)|(?<Suffix>^[A-Z]{3}[0-9]{1,3}[A-Z]$)|(?<DatelessLongNumberPrefix>^[0-9]{1,4}[A-Z]{1,2}$)|(?<DatelessShortNumberPrefix>^[0-9]{1,3}[A-Z]{1,3}$)|(?<DatelessLongNumberSuffix>^[A-Z]{1,2}[0-9]{1,4}$)|(?<DatelessShortNumberSufix>^[A-Z]{1,3}[0-9]{1,3}$)|(?<DatelessNorthernIreland>^[A-Z]{1,3}[0-9]{1,4}$)|(?<DiplomaticPlate>^[0-9]{3}[DX]{1}[0-9]{3}$)

For use in JavaScript (with named groups removed):

(^[A-Z]{2}[0-9]{2}\s?[A-Z]{3}$)|(^[A-Z][0-9]{1,3}[A-Z]{3}$)|(^[A-Z]{3}[0-9]{1,3}[A-Z]$)|(^[0-9]{1,4}[A-Z]{1,2}$)|(^[0-9]{1,3}[A-Z]{1,3}$)|(^[A-Z]{1,2}[0-9]{1,4}$)|(^[A-Z]{1,3}[0-9]{1,3}$)|(^[A-Z]{1,3}[0-9]{1,4}$)|(^[0-9]{3}[DX]{1}[0-9]{3}$)