View gist:4542b8f66cc07dc23760
// Works in modern browsers + IE9, but Modernizr has a polyfill baked in for function.bind. | |
// Hat tip Paul Irish | |
var o = $( {} ); | |
$.subscribe = o.on.bind(o); | |
$.unsubscribe = o.off.bind(o); | |
$.publish = o.trigger.bind(o); |
View vhost.pp
# Define | |
define apache::vhost ( | |
$port, | |
$docroot, | |
$servername = $title, | |
$vhost_name = '*' | |
) { | |
include apache # contains Package['httpd'] and Service['httpd'] | |
include apache::params # contains common config settings |
View websrv_service_nginx.pp
# Call | |
apache::vhost { "example.com": | |
docroot => '/var/www/html', | |
priority => '25', | |
} |
View uat_server.pp
# Example role | |
class role::uat_server { | |
include profiles::base | |
include profiles::customapp | |
include profiles::test_tools | |
} |
View gist:a8d6d7353a28543bb44d
(function($)) { | |
var o = $( {} ); | |
$.each({ | |
on: 'subscribe', | |
trigger: 'publish', | |
off: 'unsubscribe' | |
}, function( key, api ) { | |
$[api] = function() { | |
o[key].apply( o, arguments ); |
View gitlab.pp
# Example profile: | |
class profiles::gitlab { | |
## Hiera lookups | |
# - not yet | |
# see: http://garylarizza.com/blog/2014/02/17/puppet-workflow-part-2/ | |
# $site_name = hiera('profiles::gitlab::site_name') | |
## Create user |
View gist:0a6955c0fcca99b7e818
`cygpath.exe -ua "Q:\Schnellspeicherort\2015-04-08 11_39_18-Greenshot.png"` |
View params.pp
class mysql::params { | |
case $::osfamily { | |
'RedHat': { | |
if $::operatingsystem == 'Fedora' and (is_integer($::operatingsystemrelease) and $::operatingsystemrelease >= 19 or $::operatingsystemrelease == "Rawhide") { | |
$client_package_name = 'mariadb' | |
$server_package_name = 'mariadb-server' | |
} else { | |
$client_package_name = 'mysql' | |
$server_package_name = 'mysql-server' | |
} |
View post-receive.erb
# This file is managed by Puppet. DO NOT EDIT. | |
# Getting a List of All Variables | |
<% scope.to_hash.keys.each do |k| -%> | |
<%= k %> | |
<% end -%> |
View gist:71568d3265c20b387f34
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title></title> | |
<link rel="stylesheet" href="css"> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" /> |
OlderNewer