This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo on | |
setlocal | |
set DAYS=31 | |
set DOWNLOADS=C:\WINDOWS\SoftwareDistribution\Download | |
rem http://bit.ly/IttCwo | |
rem http://stackoverflow.com/a/51069/5700 | |
net stop wuauserv | |
forfiles /p %DOWNLOADS% /s /d -%DAYS% /c "cmd /c if @isdir==FALSE (del @file) else (rd /s /q @file)" | |
net start wuauserv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -vH "Accept: application/json" 'http://localhost:8080/resources' --data-urlencode 'query=["not", ["=", "type", "Nonsense"]]' | |
* About to connect() to localhost port 8080 (#0) | |
* Trying ::1... Connection refused | |
* Trying 127.0.0.1... connected | |
* Connected to localhost (127.0.0.1) port 8080 (#0) | |
> POST /resources HTTP/1.1 | |
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 | |
> Host: localhost:8080 | |
> Accept: application/json | |
> Content-Length: 78 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Pin Ubuntu to use Puppet 2.7.* rather than Puppet 3. | |
# Assumes you're using the Puppet APT repo at apt.puppetlabs.com. | |
# Thanks to haus for the technique. | |
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF | |
Package: puppet puppet-common puppetmaster puppetmaster-common | |
Pin: version 2.7* | |
Pin-Priority: 501 | |
EOF | |
echo Release pinned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class puppetlabs { | |
# Install Puppet repository and call apt-get update | |
case $operatingsystem { | |
ubuntu: { | |
$key = "4BD6EC30" | |
exec { 'apt-key puppetlabs': | |
path => "/bin:/usr/bin", | |
unless => "apt-key list | grep '${key}' | grep -v expired", | |
command => "apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${key}", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Added logging detail in attempt to debug problem, to no avail. | |
; A list of modules. | |
[/modules] | |
CheckDisk=1 | |
CheckSystem=1 | |
CheckTaskSched=1 | |
NSClientServer=0 | |
NRPEServer=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class nagios { | |
$targets = '/etc/nagios3/puppets.d' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
net = require('net'), | |
bouncy = require('bouncy'), | |
MuxDemux = require('mux-demux'); | |
var mux_server_port = 8192; | |
var trampoline_port = 8193; | |
var target_server_port = 8194; | |
var mux; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this terminates: yes | head | |
// this hangs: node node-yes-simple.js | head | |
// per mhart, this is entirely expected | |
while(true) { | |
process.stdout.write('{"yes": "yes"}\n'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NAMESPACE::package ( | |
$package = $NAMESPACE::package::params::package, | |
$repository = $NAMESPACE::package::params::repository, | |
$repokey = $NAMESPACE::package::params::repokey, | |
$reponame = $NAMESPACE::package::params::reponame, | |
$keyserver = $NAMESPACE::package::params::keyserver | |
) inherits NAMESPACE::package::params { | |
package { $package: | |
ensure => installed, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/modules/mongodb/manifests/init.pp | |
class mongodb { | |
} |