Skip to content

Instantly share code, notes, and snippets.

@stick
stick / puppet.vim
Created March 29, 2011 20:23
syntax_checker for puppet -- requires syntastic
"============================================================================
"File: puppet.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Chris MacLeod <stick at miscellaneous dot net>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
@stick
stick / setec design notes
Created April 8, 2011 20:20
role based access design notes for password management
Roles
------
admin
Tasks
------
Password Entries
- create entry
- edit entry
@stick
stick / crease.rb
Created April 11, 2011 15:30
ugly script so var
#!/usr/bin/env ruby
begin
require 'rubygems'
rescue LoadError
end
# require 'YAML'
require 'yaml'
@stick
stick / gist:2726953
Created May 18, 2012 18:39
define with source or template
define clever-file (
$source,
$ensure = 'present',
) {
case $source {
/^puppet:/: {
$is_source = true
$is_template = false
}
@stick
stick / service_alert.py
Created July 10, 2012 14:21
server_alert
#!/usr/bin/env python
SENDMAIL = "/usr/sbin/sendmail"
import os
import sys
def main():
n_host_alias = os.getenv("NAGIOS_HOSTALIAS")
n_host_address = os.getenv("NAGIOS_HOSTADDRESS")
n_long_date = os.getenv("NAGIOS_LONGDATETIME")
@stick
stick / query.sql
Created July 10, 2012 18:35
query
SELECT
scores.player_id,
ifnull(scores.hole_1 , 0) +
ifnull(scores.hole_2 , 0) +
ifnull(scores.hole_3 , 0) +
ifnull(scores.hole_4 , 0) +
ifnull(scores.hole_5 , 0) +
ifnull(scores.hole_6 , 0) +
ifnull(scores.hole_7 , 0) +
ifnull(scores.hole_8 , 0) +
@stick
stick / hook-receiver.py
Created July 31, 2012 18:40
modification of hook-reciever.py
#!/usr/bin/env python
'''
Takes a GitHub service hook POST and automatically updates the associated repo.
'''
__license__ = '''
Copyright 2009 Jake Wharton
hookpuller is free software: you can redistribute it and/or modify
@stick
stick / ldap_admin.rb
Created September 17, 2012 14:41 — forked from tritonrc/ldap_admin.rb
Simple Sinatra based LDAP admin tool
require 'rubygems'
require 'sinatra'
require 'net-ldap'
require 'digest/sha1'
require 'base64'
require 'haml'
LDAP_HOST = 'localhost'
ADMIN_DN = 'cn=admin,dc=company,dc=com'
@stick
stick / new version
Last active September 1, 2016 18:21
# (C) 2012, Michael DeHaan, <[email protected]>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@stick
stick / app.rb
Created September 30, 2016 21:14
#!/usr/bin/env ruby
#
#
require 'dotenv'
Dotenv.load
require 'pp'
require 'pg'
require 'sinatra/base'