Skip to content

Instantly share code, notes, and snippets.

View snobear's full-sized avatar
🎸

Jason Ashby snobear

🎸
  • NC
  • 03:57 (UTC -04:00)
View GitHub Profile
@snobear
snobear / mco-cheat-sheet
Last active December 10, 2021 16:51
MCollective cheat sheet
# MCollective Cheat Sheet
MCollective is a server orchestration tool that is built by Puppet Labs and so is tightly integrated with the puppet infrastructure. Commands a run from the control aka "client" server.
## Finding/listing hosts
List all
```
mco find
@maus-
maus- / logstash.conf
Created May 14, 2014 03:52
Logstash conf for rsyslog + auditd logs into elasticsearch
input {
syslog = {
type => syslog
port => 514
}
}
filter {
grok {
type => "auditd"
pattern => [" AUDIT type=%{WORD:audit_type} msg=audit\(%{NUMBER:audit_epoch}:%{NUMBER:audit_coun
@ksexton
ksexton / CHEATSHEET.md
Created March 10, 2014 19:19
mcollective cheatsheet

mcollective cheatsheet

Agents

List installed agents

$ mco plugin doc
@snobear
snobear / clone.py
Last active October 17, 2023 06:39
Clone VM from template with pyVmomi
#!/usr/bin/env python
"""
NOTE:
This gist has been moved to EZmomi:
https://github.com/snobear/ezmomi
Give it a star or fork. Contributions are more than welcome. I'm hoping it will become an easy cli tool for
common VMware tasks.
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active March 26, 2024 23:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@DamonOehlman
DamonOehlman / README.md
Last active October 30, 2023 20:03
General WebRTC tips and tricks collated over time
@nodesocket
nodesocket / kibana
Created July 7, 2013 01:49
Kibana init.d service script.
#!/bin/bash
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Make sense of a mountain of logs.
### END INIT INFO
@leonardreidy
leonardreidy / prep-contacts-for-ponymailer
Created July 5, 2013 14:07
Parse html file with Beautiful Soup, find emails and names and output as json, ready for ponymailer.rb. Emails are found (with href=mailto) and names (inside <strong> tags). The program creates a single list that contains both names, and emails, and then output it as json, ready for ponymailer to send.
# A simple python script to extract names, and emails from
# a certain online directory
import os, json
from bs4 import BeautifulSoup
#get a list of the files in the current directory
inputfiles = os.listdir(os.getcwd())
def postproc(inputfiles):
@benbalter
benbalter / gist.md
Last active November 2, 2023 02:04
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

@jackreichert
jackreichert / inputtitle_submit.js
Last active September 26, 2020 15:03
Example showing how to use AJAX in WordPress
(function ($) {
$(document).ready(function () {
$('#next').click(function () {
$.post(
PT_Ajax.ajaxurl,
{
// wp ajax action
action: 'ajax-inputtitleSubmit',
// vars