Skip to content

Instantly share code, notes, and snippets.

View c0sco's full-sized avatar
💭
I may be slow to respond.

Matt Stofko c0sco

💭
I may be slow to respond.
View GitHub Profile
@c0sco
c0sco / keybindings.json
Last active August 8, 2020 19:45
vscode settings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+e",
"command": "workbench.action.quickOpen",
"when": "!terminalFocus"
},
{
"key": "ctrl+e",
"command": "-workbench.action.quickOpen"
@c0sco
c0sco / gist:084f0407512c236dfdf0118e9f209e9e
Created March 11, 2019 20:20
Packer amazon-import encryption tests
# S3: no encryption, AMI: no encryption (original behavior)
$ bin/packer build etc/test-encrypt/amazon-test-s3_no-ami_no.json
file output will be in this color.
==> file: Copying ami.raw to filetarget.raw
==> file: Copied 5368709120 bytes
==> file: Running post-processor: amazon-import
file (amazon-import): Uploading filetarget.raw to s3://c0sco-packer-ami/packer-import-1552327199.raw
file (amazon-import): Completed upload of filetarget.raw to s3://c0sco-packer-ami/packer-import-1552327199.raw
file (amazon-import): Started import of s3://c0sco-packer-ami/packer-import-1552327199.raw, task id import-ami-01b09d9e7594586c8
@c0sco
c0sco / packer_amazon-import_tests.txt
Created October 29, 2018 21:28
Test output for Packer amazon-import post-processor
# Testing unsupported format
$ ./packer build etc/test/amazon-test-bad-format.json
file output will be in this color.
1 error(s) occurred:
* invalid format 'nopers'. Only 'ova', 'raw', 'vhd', 'vhdx', or 'vmdk' are allowed
# Testing OVA (original functionality)

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@c0sco
c0sco / toup.sh
Created January 30, 2013 13:21
Quick and dirty script for parsing 'portupgrade -na' on a FreeBSD system to see which ports have changed versions and not just port revisions.
#!/usr/local/bin/bash
PUOUT=`portupgrade -na`
TOUP=`echo "$PUOUT" | grep " \-> " | awk '{print $3 "\n" $5}' | tr -d \( | tr -d \) | sed -e 's/_.*$//' | uniq -u`
FINAL=`for i in $TOUP ; do echo "$PUOUT" | grep $i | grep -v Upgrading ; done`
echo "$FINAL" | uniq | awk '{print $3 " " $4 " " $5}' | sed -e "s/^(//" -e "s/)$//"