Skip to content

Instantly share code, notes, and snippets.

View ericpardee's full-sized avatar

ericpardee ericpardee

View GitHub Profile
@ericpardee
ericpardee / pet-snippet.toml
Created June 22, 2022 20:35 — forked from varenc/pet-snippet.toml
description
[[snippets]]
description = "start dev file syncer. uses fswatch to know when to run rsync. does not sync .git file. Sort like a write-through cache network file system with only eventual consistency guarantees."
command = "fswatch -0 --exclude \"\\.git\" --exclude \"\\.xml\" --exclude \"___\" -o /Users/chris/Documents/workspace/lingt_chris_dev_rsync_checkout/myproject | xargs -0 -n 1 -I {} rsync --progress --exclude '*.pyc' --exclude '*.git' --recursive ~/workspace/lingt_chris_dev_rsync_checkout/myproject dev@dev.server:/home/user/webapps/dev_chris/myproject"
output = ""
[[snippets]]
description = "plex find unscanned tv!"
command = "cat <(find /Users/chris/Downloads/media/dbx_mount/tv -type f | sed 's/.*\\///' | grep 'mp4\\|mkv\\|avi') <(unbuffer /Applications/Plex\\ Media\\ Server.app/Contents/MacOS/Plex\\ Media\\ Scanner -c 4 --tree | grep 'mp4\\|mkv\\|avi' | sed 's/.*\\///' | sed 's/\\w*\\[.*\\]$//' | awk '{$1=$1};1') | sort | uniq -u"
output = ""
$ pulumi up
Previewing update (hello-fargate)
View Live: https://app.pulumi.com/ericpardee/hello-fargate/hello-fargate/previews/39d16f8d-43a9-4bb3-a17d-6de535d2d36c
Type Name Plan Info
pulumi:pulumi:Stack hello-fargate-hello-fargate 4 errors; 10 messages
+ ├─ aws:ecs:Cluster default-cluster create
+ └─ awsx:lb:ApplicationLoadBalancer nginx-lb create
# when get
$ mosh proxMac-Pro 130 ↵
zsh:1: command not found: mosh-server
Connection to 192.168.0.94 closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)
# did you install mosh with homebrew? Then
$ mosh --server=/usr/local/Cellar/mosh/1.3.2_18/bin/mosh-server proxMac-Pro
@ericpardee
ericpardee / README.md
Created May 28, 2022 22:48 — forked from tomdaley92/README.md
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@ericpardee
ericpardee / update-all-route53-domains-contacts.py
Created April 23, 2022 13:36 — forked from mvanholsteijn/update-all-route53-domains-contacts.py
update the contacts of all route53 registered domains
import boto3
import json
contact = {
"FirstName": "Mark",
"LastName": "van Holsteijn",
"ContactType": "COMPANY",
"AddressLine1": "Laapersveld 27",
"City": "Hilversum",
"CountryCode": "NL",
@ericpardee
ericpardee / brew.txt
Last active January 17, 2022 16:51
macOS Homebrew (brew installs)
$ brew leaves
arduino-cli
argocd
arping
asciinema
asciiquarium
assh
automake
aws-shell
aws/tap/aws-sam-cli
<?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">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Comment</key>
---
#
# Required parameters
#
email: craigslist-renew@example.com
password: CooperNetties
notify: craigslist-renew@example.com
#
# Optional parameters
#
# Create EventBridge event alerts when there are CRITICAL severity vulnerabilities in an ECR Image Scan
{
"detail-type": [
"ECR Image Scan"
],
"source": [
"aws.ecr"
],
"detail": {
"finding-severity-counts": {
@ericpardee
ericpardee / buckyeah.md
Last active September 8, 2020 04:29
How can I migrate my Amazon S3 bucket to another AWS Region?

You can't move an Amazon Simple Storage Service (Amazon S3) bucket to another AWS Region

But once you follow all these instructions, and sync your buckets aws s3 sync s3://wrongregion-bestbucketever s3://bestbucketever-temp --source-region us-west-1 --region us-west-2 it says

To claim the bucket name as soon as it's available, you can run a script to continuously check the bucket name's availability.

That script is this (I didn't just issue the CreateBucket API call because my situation is more involved):

buckYeah() { if aws s3api wait bucket-exists --bucket bestbucketever ; then echo "Terraform Time" | mail -s "Bucket Ready" ericpardee@github.com ; else buckYeah ; fi ; } ; buckYeah