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
in puppet.conf add (not needed in recent puppet versions, 3.5+ or something): | |
cadir = $ssldir/ca { mode = 775 } | |
cacert = $cadir/ca_crt.pem { mode = 664 } | |
csrdir = $cadir/requests { mode = 775 } | |
signeddir = $cadir/signed { mode = 775 } | |
in apache site add (change /etc/puppet/ssl to your ssldir path): |
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
# Add fixture lib dirs to LOAD_PATH. Work-around for PUP-3336 | |
# | |
if Puppet.version < "4.0.0" | |
Dir["#{fixture_path}/modules/*/lib"].entries.each do |lib_dir| | |
$LOAD_PATH << lib_dir | |
end | |
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
# | |
# = Capistrano database.yml task | |
# | |
# Provides a couple of tasks for creating the database.yml | |
# configuration file dynamically when deploy:setup is run. | |
# | |
# Category:: Capistrano | |
# Package:: Database | |
# Author:: Simone Carletti <weppos@weppos.net> | |
# Copyright:: 2007-2009 The Authors |
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
== Rules == | |
On Infrastructure | |
----------------- | |
There is one system, not a collection of systems. | |
The desired state of the system should be a known quantity. | |
The "known quantity" must be machine parseable. | |
The actual state of the system must self-correct to the desired state. | |
The only authoritative source for the actual state of the system is the system. | |
The entire system must be deployable using source media and text files. |
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
# you'd obviously have more settings somewhere | |
set :scm, :git | |
set :repository, "git@github.com:defunkt/github.git" | |
set :branch, "origin/master" | |
set :migrate_target, :current | |
set(:latest_release) { fetch(:current_path) } | |
set(:release_path) { fetch(:current_path) } | |
set(:current_release) { fetch(:current_path) } |
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
begin | |
require File.expand_path('../.bundle/environment', __FILE__) | |
rescue LoadError | |
# Fallback on doing the resolve at runtime. | |
require "rubygems" | |
require "bundler" | |
Bundler.setup | |
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
In response to all the responses to: | |
http://twitter.com/rtomayko/status/1155906157 | |
You should never do this in a source file included with your library, | |
app, or tests: | |
require 'rubygems' | |
The system I use to manage my $LOAD_PATH is not your library/app/tests |
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
$projectroot = '/path/to/gitosis/repositories'; | |
$gitosis_conf = '/path/to/gitosis/repositories/gitosis-admin.git/gitosis.conf'; | |
$username = $cgi->remote_user; | |
$export_auth_hook = sub { | |
my $projectdir = shift; | |
if($projectdir =~ (/(.*?)\.git/)) { | |
my $projectname = basename($1); | |
open FILE, $gitosis_conf or die 'Could not open gitosis config file. Please make sure that $gitosis_conf is set properly'; | |
my $project_match = 0; | |
my $user_match = 0; |
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
// Place your application-specific JavaScript functions and classes here | |
// This file is automatically included by javascript_include_tag :defaults | |
$(function() { | |
MIN_ANSWERS = 2 | |
MAX_ANSWERS = 10 | |
MIN_ANSWERS_MSG = "Minimum of two(2) answers required." | |
MAX_ANSWERS_MSG = "Maximum of ten(10) answers only." | |
TOP_ANSWER_MSG = "Can't go up answer is on the top list." |
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 | |
function manage_user() | |
{ | |
user=$1 | |
password=$2 | |
shift; shift; | |
out=`ralsh user $user password='$password' ensure=present` | |
echo $out | grep 'notice.*changed password' |
OlderNewer