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/env bash | |
export LANGUAGE="en_US.UTF-8" | |
export LC_ALL="en_US.UTF-8" | |
export LC_CTYPE="UTF-8" | |
export LANG="en_US.UTF-8" | |
##### Var | |
PIP='pip' |
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
// dumb non-jquery delay for quick offline tryouts | |
function delay(milliseconds) { | |
var _start = new Date().getTime(); | |
for (;;) { | |
var _now = new Date().getTime(); | |
if ((_now - _start) > milliseconds){ | |
break; | |
} | |
} |
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/env bash | |
set -e | |
##### | |
# MDBM workspace quick-setup helper | |
##### | |
GARAGE_BASEDIR="/tmp/mdbm-garage" | |
MDBM_BASEDIRNAME="github-yahoo-mdbm" | |
MDBM_GITURI="https://github.com/yahoo/mdbm" |
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/env ruby | |
module PuppetMaster | |
def self.puppetmaster_cmd | |
'puppet master --debug --verbose' | |
end | |
def self.start | |
puts "Starting Puppet Master in Debug+Verbose+Daemon mode logging to /var/log/puppet/a.log" | |
puts "Started." if system("#{puppetmaster_cmd} >> /var/log/puppet/a.log") |
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
http://justfewtuts.blogspot.com/2012/07/puppet-beginners-concept-guide-part-2.html | |
<tomcat-module>/manifests/install.pp | |
class <tomcat-module>::install { | |
package { 'tomcat6': ensure => 'installed', } | |
} | |
<tomcat-module>/manifests/configure.pp | |
class <tomcat-module>::configure { | |
<tomcat-module>::configure::war { |
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
# get colored terminal output using these String methods | |
class String | |
def colortxt(txt, term_color_code) | |
"\e[#{term_color_code}m#{txt}\e[0m" | |
end | |
def bold; colortxt(self, 1); end | |
def thin; colortxt(self, 2); end |
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
# $MODULEPATH/httpd/manifests/git.pp | |
class httpd::git { | |
include httpd::params | |
$is_cgi = $httpd::params::is_cgi | |
$path = $httpd::params::path | |
$url = $httpd::params::url | |
file { |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2. in line 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
# $MANIFESTPATH/extdatadir/common.csv | |
httpd_conf_dir,/etc/httpd/conf.d | |
httpd_is_cgi,true | |
httpd_git_path,/var/www/git | |
httpd_git_url,/mygit |
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
# $MODULEPATH/httpd/manifests/git.pp | |
class httpd::git { | |
file { | |
"${::conf_dir}/git.conf": | |
ensure => 'present', | |
content => template('httpd/mynode.conf.erb'), | |
} | |
} |
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
#!/bin/sh | |
# | |
# chkconfig: - 85 15 | |
# description: resque-scheduler service script | |
# | |
app_name=$MY_APP_NAME | |
pidfile_sched="/var/run/$MY_APP_NAME-resque-sched.pid" | |
app_dir="/opt/$MY_APP_NAME" |
OlderNewer