Skip to content

Instantly share code, notes, and snippets.

10:39 < major> well, it goes something like this: ssh-keygen -f
servers_CA;ssh-keygen -f users_CA
10:40 < major> after that: ssh-keygen -s <CA_file> -I <description> -n
<principals> <pubkey_file>
10:40 < major> for users
10:40 < major> and: ssh-keygen -s <CA_file> -I <description> -h -n <hostnamess>
<pubkey file>
10:40 < major> for signing host pubkeys
10:41 < major> you can add a @ca-authority in your authorized keys to trust all
signed keys by that CA
# a config.ru, for use with every rack-compatible webserver.
# SSL needs to be handled outside this, though.
# if puppet is not in your RUBYLIB:
# $LOAD_PATH.unshift('/opt/puppet/lib')
$0 = "master"
# if you want debugging:
# ARGV << "--debug"
@frozenfoxx
frozenfoxx / vmpooler.yaml
Last active January 14, 2016 20:42
vmpooler.yaml
---
:vsphere:
server: '<server IP>'
username: 'root'
password: '<password>'
:redis:
server: 'dns.pool.domain.com'
:graphite:
@frozenfoxx
frozenfoxx / service.pp
Last active February 21, 2017 20:50
PacketFilter Service for OS X
# Ensure PacketFilter is running
service { 'pfctl':
ensure => 'running',
provider => base,
restart => 'pfctl -d && pfctl -F all && pfctl -f /etc/pf.conf && pfctl -e',
start => 'pfctl -f /etc/pf.conf && pfctl -e',
status => "echo \"pfctl -s info 2>/dev/null | grep Status | [ $(awk '{print \$2}') == Enabled ]\" | bash",
stop => 'pfctl -d',
}
@rroemhild
rroemhild / errbot.service
Created May 11, 2016 22:14
Errbot systemd service
[Unit]
Description=Errbot
After=network.target
[Service]
Type=forking
User=errbot
Environment="CONFIGFILE=/etc/errbot/config.py"
ExecStart=/usr/local/bin/errbot --daemon --config $CONFIGFILE
ExecStop=/bin/kill -SIGINT $MAINPID
@masterzen
masterzen / connect.sh
Created November 15, 2010 07:12
Puppet SSL examples
# this simulates how a puppet agent will connect
openssl s_client -host puppet -port 8140 -cert /path/to/ssl/certs/node.domain.com.pem -key /path/to/ssl/private_keys/node.domain.com.pem -CAfile /path/to/ssl/certs/ca.pem
# outputs:
CONNECTED(00000004)
depth=1 /CN=Puppet CA: master.domain.com
verify return:1
depth=0 /CN=macbook.local
verify return:1
@jgor
jgor / unoriginal.rb
Last active March 22, 2018 03:53
UIUCTF 2015 - pwn - unoriginal
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit4 < Msf::Exploit::Remote
@stash
stash / GlobalObject.cs
Created March 30, 2018 22:18
GlobalObject.cs
using UnityEngine;
/**
* Singleton-esque inter-Scene GameObject loader.
*
* Ever wanted a singleton or global sort of GameObject that still allowed for editing properties in the Unity Editor?
* I sure did, for things like background music, a game controller, etc. So, I made this simple system of creating a global or "inter-scene" GameObject. It's not a true singleton, but it does a good job at ensuring there's only GameObject with this script attached. I don't like the approach of creating a persistent, additively-loaded scene -- not to mention the other approaches to making true Singleton objects -- so I've opted for a pre-fabbable GameObject approach.
*
* HowTo, in the Unity Editor (tested with 2017.3.1f1):
* 1. Attach this script to an empty GameObject in the current scene.
@aymen-mouelhi
aymen-mouelhi / play.py
Created January 4, 2018 09:43
Multi Threaded Gym Environment - Extract
if __name__ == '__main__':
env = gym.make('Mario-Kart-Luigi-Raceway-Multi-v0')
obs = env.reset()
env.render()
while not end_episode:
# Action should be multi-threaded + setting agent
for i in range(num_agents):
agent = i+1
@frozenfoxx
frozenfoxx / Vagrantfile-puppet-ubuntu-multi
Last active October 15, 2019 23:32 — forked from Sharpie/Vagrantfile
A simple Vagrantfile for spinning up a master-agent pair.
Vagrant.require_version ">= 1.5.0"
require 'vagrant-hosts'
require 'vagrant-auto_network'
Vagrant.configure('2') do |config|
config.vm.define :puppetmaster do |node|
# An index of pre-built boxes can be found at:
#
# https://vagrantcloud.com/puppetlabs