Skip to content

Instantly share code, notes, and snippets.

View philmcmahon's full-sized avatar

Philip McMahon philmcmahon

View GitHub Profile
@philmcmahon
philmcmahon / qubes-blogpost-ben-grande-feedback.txt
Created April 9, 2024 17:58
Feedback on Qubes/Salt blogpost from Ben Grande
- Always enforce preferences on the `qvm.prefs` module: many times I see
`label` only in `qvm.present`, which is only run on creation of the
qube, not when it already exists. The `qvm.prefs` module is checked
everytime even if the qube already exists. I think label should be
enforced not let for the user to modify and then later the state
ignore the label change, but of course I don't know your internal
policy about this matter and I might be wrong depending on it.
- Do not specify literal names as the `source` value of `qvm.clone`,
@philmcmahon
philmcmahon / winstall.sh
Last active June 2, 2023 13:31
windows-rg-xsv
curl "https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-pc-windows-gnu.zip" >ripgrep.zip
curl "https://github.com/BurntSushi/xsv/releases/download/0.13.0/xsv-0.13.0-x86_64-pc-windows-gnu.zip" > xsv.zip
curl "https://data-harvest-2023-csv-data.s3.eu-west-1.amazonaws.com/CLEAN_CCOD_FULL_2023_05.zip" > CLEAN_CCOD_FULL_2023_05.zip
@philmcmahon
philmcmahon / install.sh
Created June 2, 2023 12:52
xsv-rg-install
curl -LO "https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb"
sudo dpkg -i ripgrep_13.0.0_amd64.deb
curl -Lo xsv.tar.gz "https://github.com/BurntSushi/xsv/releases/latest/download/xsv-0.13.0-x86_64-unknown-linux-musl.tar.gz"
sudo tar xf xsv.tar.gz -C /usr/local/bin
sudo chmod +x /usr/local/bin/xsv
@philmcmahon
philmcmahon / postgres-aurora-migration-costs.md
Last active May 19, 2023 14:55
Postgres/Aurora migration costs

Costs based off AWS current pricing in eu-west-1

Date Engine Instance Storage IOPs Instance costs Storage costs PIOP costs Aurora Storage + IO Total Monthly
September 2021 RDS db.t3.medium 20GB Burstable (gp2) $47 $2.50 n/a $49.50
November 2021 RDS db.m6g.large 100GB Burstable (gp2) $128 $12.70 n/a $140.70
November 2021 - during major ingest RDS
@philmcmahon
philmcmahon / aurora-v2-cdk.ts
Created April 28, 2023 16:30
Aurora Serverless V2 CDK Example
const dbClusterIdentifier = `my-db`;
const dbSecret = new DatabaseSecret(this, "DBSecret", {
username: "user",
});
const parameterGroup14 = new CfnDBClusterParameterGroup(
this,
"DBParameterGroup14",
#!/bin/bash
pyenv install 3.7.2 -s
pyenv shell 3.7.2
pip3 install vpn-slice
openconnect https://digivpn.theguardian.com -s 'vpn-slice teamcity.gutools.co.uk janus.gutools.co.uk riffraff.gutools.co.uk metrics.gutools.co.uk'

Keybase proof

I hereby claim:

  • I am philmcmahon on github.
  • I am philmc (https://keybase.io/philmc) on keybase.
  • I have a public key ASBBRei1BtcnPUeCbM-gqyElQX_4NdHNqoAqE4ObZWYaOAo

To claim this, I am signing this object:

public static CounterMeasurementBuilder builder(String name) {
public CounterMeasurementBuilder setMetricAttribute(String name, Object value)
public CounterMeasurement build()
}
public static SingleValueGaugeMeasurementBuilder builder(String name) {
public SingleValueGaugeMeasurementBuilder setMetricAttribute(String name, Object value)
public SingleValueGaugeMeasurement build()
}