Skip to content

Instantly share code, notes, and snippets.

View jpuskar's full-sized avatar

John Puskar jpuskar

  • AmTrust
  • Cleveland, OH
View GitHub Profile
@jpuskar
jpuskar / fedora.md
Last active August 7, 2017 20:52 — forked from olpoco/fedora.md
Installing Fedora 23 on Macbook Pro Retina 2016, and attaching Airport Extreme

Installing Fedora on Macbook Pro retina

  1. Download Fedora 25 iso, create a usb bootable media
  2. Use diskutil list to figure out which drive is the usb, on macbook pro with 1 hardrive, the usb is /dev/disk2
  3. Umount the disk using diskutil unmountDisk /dev/disk2 or use Mac's Disk Utility (just umount, don't eject, umount removes it from directory structure and eject disconncet it altogether)
  4. Use dd(a low level cp) to write iso content into the usb drive, sudo dd if=~/Downloads/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/rdisk2 bs=8m, this will take a bit of time, make sure you wait until it's done, additionally compare the size or checksum to make sure all has been copied (not that necessary since if it weren't copied, it'll err at boot time)
  5. Use Disk Utility to shrink Mac's harddrive to create partition for the subsequent fedora installation
  6. Boot to recovery mode (cmd+r) and disable SIP (termina
@jpuskar
jpuskar / watch haproxy sticky tables
Created January 19, 2017 18:29 — forked from jeremyj/watch haproxy sticky tables
watch haproxy sticky tables
watch -n 1 'echo "show table http" | socat unix:/var/run/haproxy.sock -'
watch -n 1 'echo "show table public" | socat unix:/var/run/haproxy.sock -'
@jpuskar
jpuskar / gist:e7d41f44f9d565f2c4e39bf5ea80e37a
Last active April 2, 2023 09:25 — forked from nvalentine-puppetlabs/gist:7036421
List Exported Resources via PuppetDB query
curl -G -H "Accept: application/json" http://localhost:8080/pdb/query/v4/resources --data-urlencode 'query=["=","exported", true]'
@jpuskar
jpuskar / haproxy_cluster_vars.conf
Created January 13, 2017 01:11 — forked from sgnn7/haproxy_cluster_vars.conf
Seamless haproxy on marathon-lb w/ systemd
# /etc/systemd/system/haproxy.service.d/haproxy_cluster_vars.conf
[Service]
Environment="PIDFILE=/run/haproxy.pid"
Environment="HAPROXY_SOCKET=/var/run/haproxy/socket"
# Get rid of the socket on start/stop
ExecStartPre=/bin/bash -c "rm -f $HAPROXY_SOCKET"
ExecStopPost=/bin/bash -c "rm -f $HAPROXY_SOCKET"
# XXX: Do seamless reloads
@jpuskar
jpuskar / splunk-hec.psm1
Created January 5, 2017 23:45 — forked from halr9000/splunk-hec.psm1
Send-SplunkEvent, a PowerShell cmdlet for sending events to the Splunk HTTP event collector
# TODO: write the help
# TODO: support SSL self-signed certs
# TODO: need to validate JSON, and/or add a new param set that accepts hashtable and
# convert internally.
# TODO: support RAW mode
# TODO: refactor to use EC batch (concatenated events in one HTTP request) instead of
# PowerShell pipelines which will do a request per object (event payload) on the pipeline
# TODO: think about load balancing per Geoffrey Martins.