Skip to content

Instantly share code, notes, and snippets.

@mrrcollins
mrrcollins / gist:4121173
Created November 20, 2012 21:12
Launch puppet - original pushed out from puppet
<?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>Disabled</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/sbin:/usr/sbin:/bin:/usr/bin</string>
@mrrcollins
mrrcollins / gist:4121429
Created November 20, 2012 21:48
10.5.8 - This is what it changed to.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/sbin:/usr/sbin:/bin:/usr/bin</string>
<key>RUBYLIB</key>
<string>/usr/lib/ruby/site_ruby/1.8/</string>
/etc/puppet/hiera.yaml
---
:backends:
- yaml
:yaml:
:datadir: /etc/puppet/hieradata
:hierarchy:
- nodeinfo
- common
apt-get update
apt-get upgrade
apt-get install -y tmux vim
apt-get -y install lighttpd
/etc/init.d/lighttpd stop
update-rc.d lighttpd remove
apt-get -y install dnsmasq
/etc/init.d/dnsmasq stop
update-rc.d dnsmasq remove
rm /bin/sh
@mrrcollins
mrrcollins / cvwatches.py
Created November 29, 2014 02:40
Record the number of times I've watched Christmas Vacation
import clipboard
import webbrowser
import urllib
cvfile = open('cvwatches.txt','r')
w = int(cvfile.read()) + 1
cvfile.close()
cvfile = open('cvwatches.txt','w')
cvfile.write(str(w))
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
#include <Keyboard.h>
int sensorPin = 10;
void setup()
{
pinMode(sensorPin, INPUT);
Serial.begin(9600);
Keyboard.begin();
}
@mrrcollins
mrrcollins / domain-check
Created January 29, 2016 01:28
Check expiration on domains.
#!/bin/bash
#
# Program: Domain Expiration Check <domain-check>
#
# Author: Matty < matty91 at gmail dot com >
#
# Current Version: 2.1
#
# Revision History:
# Version 2.1

Keybase proof

I hereby claim:

  • I am mrrcollins on github.
  • I am mr_rcollins (https://keybase.io/mr_rcollins) on keybase.
  • I have a public key ASBaNVyqOe0F1b5nUW7BcUUZsFb3ghWKPJO2F-L7XlScWQo

To claim this, I am signing this object:

#!/bin/bash
cd ~/.znc
sudo certbot -d ZNC.DOMAIN.TLD --manual --manual-public-ip-logging-ok --preferred-challenges dns certonly
sudo cp /etc/letsencrypt/live/ZNC.DOMAIN.TLD/fullchain.pem znc.pem
sudo cat /etc/letsencrypt/live/ZNC.DOMAIN.TLD/privkey.pem >> znc.pem
# Copy certificate over for weechat
cp znc.pem ~/.weechat/ssl/relay.pem
# Inside weechat, in the weechat buffer, use