This file contains 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
#!/usr/bin/ruby | |
require 'webrick' | |
require 'json' | |
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP) | |
req.parse(STDIN) | |
json_payload = JSON.parse(req.query['payload']) | |
branch = json_payload['ref'].split('/')[-1] |
This file contains 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
define foo ($primary_interface='eth0') { | |
notify { "foo $name local-scope": | |
message => $primary_interface | |
} -> | |
notify { "foo $name top-scope": | |
message => $::primary_interface | |
} | |
} |
This file contains 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
## @noparams | |
## wtf, seriously!? | |
#set($containerManagerClass = $action.class.forName('com.atlassian.spring.container.ContainerManager')) | |
#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null)) | |
#set($containerManager = $getInstanceMethod.invoke(null,null)) | |
#set($containerContext = $containerManager.containerContext) | |
## now what we actually need ... | |
#set($likeManager = $containerContext.getComponent('likeManager')) |
This file contains 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
## @param gist:title=gist URL|type=string|required=true | |
#set ( $gist = $paramgist.replace("https://gist.github.com/", '') ) | |
#set ( $data = [] ) | |
#foreach($part in $gist.split("/")) | |
#set ($t = $data.add($part)) | |
#end | |
#set( $gistuser = $data.get(0) ) | |
#set( $gisthash = $data.get(1) ) |
This file contains 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 foo { | |
notify { 'foo': } | |
} | |
class bar { | |
notify { 'bar': message => inline_template("<%= if classes.include?('foo') then 'bar' end %>") } | |
} | |
include foo | |
include bar |
This file contains 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
root@mirror:/srv/repositories/puppetlabs# ls dists/ | |
hardy oneiric sid testing | |
hardy-20121220164502045137453 oneiric-20130125153303462683049 sid-20130125153917662426743 testing-20130125155100194065296 | |
lucid precise squeeze unstable | |
lucid-20130125152713336789991 precise-20130125154646712294437 squeeze-20130125154214238989172 unstable-20130125153620240304389 | |
natty quantal stable wheezy | |
natty-20130125153016311673059 quantal-20130125154844894669521 stable-20130125154953486972751 wheezy-20130125154438466243674 |
This file contains 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
augeas { 'puppet-onboot': | |
context => '/files/etc/default/puppet', | |
incl => '/etc/default/puppet', # http://projects.puppetlabs.com/issues/show/17486 | |
lens => 'Shellvars.lns', # http://projects.puppetlabs.com/issues/show/17486 | |
changes => [ | |
'set START yes', | |
], | |
} |
This file contains 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
Setting up puppet-common (2.7.20-1puppetlabs1) ... | |
Setting up puppet (2.7.20-1puppetlabs1) ... | |
* Starting puppet agent /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- puppet/util/command_line (LoadError) | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /usr/bin/puppet:3:in `<main>' | |
[fail] | |
invoke-rc.d: initscript puppet, action "start" failed. |
This file contains 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
#!ipxe | |
dhcp | |
echo Starting Ubuntu x64 installer for ${hostname} | |
set base-url http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64 | |
kernel ${base-url}/linux | |
initrd ${base-url}/initrd.gz | |
#imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg | |
boot || | |
# If everything failed, give the user some options | |
echo Boot from ${base-url} failed |
This file contains 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
mkdir -p ${WORKSPACE}/build/etc/init | |
mkdir -p ${WORKSPACE}/build/etc/init.d | |
mkdir -p ${WORKSPACE}/build/srv/gitlabhq | |
mkdir -p ${WORKSPACE}/build/etc/apache2/sites-available | |
cat >${WORKSPACE}/build/etc/apache2/sites-available/gitlabhq <<EOF | |
<VirtualHost *:80> | |
# Passenger options that can be set in a virtual host | |
# configuration block. | |
PassengerHighPerformance on |
NewerOlder