Skip to content

Instantly share code, notes, and snippets.

View groob's full-sized avatar
🌻

Victor Vrantchan groob

🌻
View GitHub Profile
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>tsutton</string>
<key>creation_date</key>
<date>2014-10-20T14:55:20Z</date>
@ahpook
ahpook / data_in_modules.md
Created February 8, 2013 14:11
Data in modules summary

Data in Modules Summary

Problem Statement

Currently, module authors use a 'params class pattern' to provide defaults for the parameters their classes accept. A module for managing a database service mydb, for example, will provide a class mydb::params, which contains parameter assignments like $mydb::params::tcp_port, $mydb::params::install_dir, etc. These assignments can use the puppet DSL for conditional logic so that the install_directory follows different OS' filesystem conventions appropriately. The parameter values are then used in the module's other classes, either in the prototype for the class or directly in the manifest:

class mydb::packages (

$tcp_port = $mydb::params::tcp_port,

@abhishekkr
abhishekkr / $conf_dir hiera.yaml
Last active December 20, 2015 12:39
Puppet Module : No Code In Data ~ using Hiera with multiple backends
:backends:
- http
- redis
- yaml
- json
:http:
:host: testnode.testenv.abk
:port: 5984
:output: json
@codingfoo
codingfoo / Readme.md
Last active February 12, 2016 03:44
Sensu Widget for Dashing

Description

Simple Dashing job to send sensu client history checks to dashing widgets.

##Dependencies

##Usage

Put the sensu.rb file in your /jobs folder.

@abhishekkr
abhishekkr / $conf_dir puppet.conf
Last active February 13, 2016 21:30
Puppet Module : No Code In Data ~ using PuppetDB in masterless puppet
[main]
storeconfigs = true
storeconfigs_backend = puppetdb
reports = store,puppetdb
pluginsync = true
@strickinato
strickinato / elm-nyc-post-to-upper.elm
Last active June 10, 2016 16:58
Written for Elm Meetup NYC June 9, 2016
import Html.App as Html
import Html exposing (..)
import Html.Events exposing (onInput)
import Html.Attributes exposing (..)
import Json.Decode exposing ((:=), Decoder)
import Json.Encode
import Task
import Http exposing (Error(..))
main =
@bruienne
bruienne / org.my.push.agent.plist
Created September 30, 2016 20:06
Sample MDM push agent
<?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>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/Library/Managed Preferences/org.my.push.plist</key>
<true/>
@groob
groob / ca-tls-server.md
Last active March 11, 2017 15:46
quick CA server

create a CA and generate keys

# pull container for https://github.com/rcrowley/certified
docker pull groob/certified:latest
# create CA and intermediary CA; will prompty you for a password
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified-ca C="US" ST="NY" L="New York" O="Example" CN="groob-ca"
# create server cert
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified CN="servq.groob.io"
# create cert chain as server.crt
cat certs/ssl/certs/servq.groob.io.crt certs/ssl/certs/ca.crt certs/ssl/certs/root-ca.crt > server.crt
@wpietri
wpietri / rover.py
Created December 7, 2015 17:11
Rover kata example for hiring
class Rover:
pass
@pudquick
pudquick / fastuser_logincheck.py
Created April 26, 2016 05:39
Using CGSSessionCopyAllSessionProperties to detect logged-in users the way the Fast User switching menu extra does on OS X with python and pyobjc
import objc
from Foundation import NSBundle
CG_bundle = NSBundle.bundleWithIdentifier_('com.apple.CoreGraphics')
functions = [("CGSSessionCopyAllSessionProperties", b"@"),]
objc.loadBundleFunctions(CG_bundle, globals(), functions)
# example usage: graphical_security_sessions = CGSSessionCopyAllSessionProperties()