Skip to content

Instantly share code, notes, and snippets.

View jessesarn's full-sized avatar

Jesse Sarnovsky jessesarn

View GitHub Profile
@jessesarn
jessesarn / README
Created January 28, 2019 14:54 — forked from wknapik/ README
Lenovo Thinkpad P50, dock with external monitor, udev + xrandr auto switching
This switches between the laptop monitor ($intern) when undocked and a two monitor setup when docked ($extern right of $intern).
ENV{ID_VENDOR_ID}, ENV{ID_MODEL_ID}, x_user and intern need to be set.
Based on the Arch wiki, StackExchange and Google.
@jessesarn
jessesarn / bgpd.conf
Created July 19, 2018 11:23 — forked from heri16/bgpd.conf
AWS VPC VPN StrongSwan Virtual Tunnel Interface (VTI)
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu)
hostname <Local OS hostname>
password <Any random phrase>
enable password <Any random phrase>
!
log file /var/log/quagga/bgpd
!debug bgp events
!debug bgp zebra
debug bgp updates
@jessesarn
jessesarn / gist:fa201ad210576d0d04580546c90e4dd6
Created June 15, 2017 20:29
Sample of debug outputs at start/end of new recipe, making vagrant act like it got data from chef search, etc.
Chef::Log.warn "entered noc_monitoring"
if Chef::Config[:solo]
mgt_servers = [ node ]
else
mgt_servers = search(:node, "recipes:nagios_feedhenry\:\:server")
end
mgt_servers.each do |n|
Chef::Log.warn "found node #{n.name}"