Skip to content

Instantly share code, notes, and snippets.

View liamdawson's full-sized avatar

Liam Dawson liamdawson

View GitHub Profile
@liamdawson
liamdawson / Gemfile
Created July 27, 2021 02:09
Extract a CSV of manual RDS DB snapshots in an AWS account
# frozen_string_literal: true
source "https://rubygems.org"
gem "aws-sdk-rds"
@liamdawson
liamdawson / build-dyld_shared_cache_util.md
Last active April 27, 2023 23:56
dyld_shared_cache_util patch
@liamdawson
liamdawson / README.md
Created October 5, 2020 22:29
Remap Capslock to Escape on Macos

Place the following file under ~/Library/LaunchAgents (e.g. ~/Library/LaunchAgents/com.ldaws.CapslockEsc.plist)

@liamdawson
liamdawson / com.ldaws.CapslockEsc.plist
Last active April 9, 2023 07:34
Caps Lock -> Esc on macos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Place in ~/Library/LaunchAgents/ -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.ldaws.CapslockEsc</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
@liamdawson
liamdawson / icons.d.ts
Last active July 27, 2018 03:16
@githubprimer/octicons-react 8.0.0 typings
declare module "@githubprimer/octicons-react" {
import * as React from 'react'
type Icon<
W extends number = number,
H extends number = number
> = React.SFC<{}> & { size: [W, H] };
type Size = 'small' | 'medium' | 'large'
interface OcticonProps {
@liamdawson
liamdawson / typed-examples.tsx
Created July 27, 2018 02:48
Type usage examples for octicons-react
import React from 'react';
// all of the icons are auto-completeable in IDE imports
import Octicon, {Globe, getIconByName} from '@githubprimer/octicons-react';
import {storiesOf} from '@storybook/react';
storiesOf('Icon', module)
// won't compile, icon prop required
.add('Empty icon', () => <Octicon />)
// won't compile, string not assignable, needs to be Icon<x, y>, or a StatelessComponent
@liamdawson
liamdawson / gnome-ext-install.sh
Created February 8, 2018 00:52
Bash script to install extensions from the command line. *Use at your own risk!*
#!/bin/bash
set -e
set -u
version="0.0"
usage="$(basename $0) version $version
usage:
$(basename $0) install <extension-uuid> [<extension-id/uuid> ... ]
@liamdawson
liamdawson / AlwaysRunVS2017AsAdmin.reg
Last active January 18, 2018 20:35
Always Run Visual Studio 2017 as Administrator (64-bit)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\devenv.exe"="RUNASADMIN"
"C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\MSEnv\\VSLauncher.exe"="RUNASADMIN"
@liamdawson
liamdawson / postinstall.txt
Created January 7, 2018 14:37
openSUSE post-install on XPS
sudo zypper in -y pam_kwallet
sudo usermod -aG wheel liamdawson
sed -i 's/## Do not insult users when they enter an incorrect password.//g' /etc/sudoers
sed -i 's/Defaults !insults/Defaults insults/g' /etc/sudoers
sed -i 's/Defaults targetpw # ask for the password of the target user i.e. root/Defaults !targetpw # ask for the password of the current user/g' /etc/sudoers
sed -i 's/ALL ALL=(ALL) ALL # WARNING! Only use this together with .Defaults targetpw.!/#ALL ALL=(ALL) ALL # only secure if targetpw default is active/g' /etc/sudoers
sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g' /etc/sudoers
rpmkeys --import https://keybase.io/docs/server_security/code_signing_key.asc

Keybase proof

I hereby claim:

  • I am liamdawson on github.
  • I am liamdawson (https://keybase.io/liamdawson) on keybase.
  • I have a public key ASDsemyfg_ZHyIFMe_vh8uRE9bJnfI0dBiqUKovyyOygpgo

To claim this, I am signing this object: