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
Steps to install and run PostgreSQL 9.3 using Homebrew (Mac OS X) | |
(if you aren't using version 9.2.4, change to the correct version) | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
mv /usr/local/var/postgres /usr/local/var/postgres92 | |
brew upgrade postgresql | |
initdb /usr/local/var/postgres -E utf8 | |
pg_upgrade -b /usr/local/Cellar/postgresql/9.2.4/bin -B /usr/local/Cellar/postgresql/9.3.0/bin -d /usr/local/var/postgres92 -D /usr/local/var/postgres | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |
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
# config/initializers/char_converter.rb | |
require 'uri' | |
module Support | |
class CharConverter | |
def initialize(app) | |
@app = app | |
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
# config/initializers/char_converter.rb | |
require 'uri' | |
module Support | |
class CharConverter | |
SANITIZE_ENV_KEYS = [ | |
"HTTP_COOKIE", # bad cookie encodings kill rack: https://github.com/rack/rack/issues/225 | |
"HTTP_REFERER", | |
"PATH_INFO", |
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
Search: @(\S*)\s= | |
Replace: let(:$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
/* global _ */ | |
/* | |
* Complex scripted Logstash dashboard | |
* This script generates a dashboard object that Kibana can load. It also takes a number of user | |
* supplied URL parameters, none are required: | |
* | |
* index :: Which index to search? If this is specified, interval is set to 'none' | |
* pattern :: Does nothing if index is specified. Set a timestamped index pattern. Default: [logstash-]YYYY.MM.DD |
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
# Based on http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html | |
# Start working on new feature/fix | |
git checkout -b <feature/fix branch name> | |
# On a regular basis, rebase against upstream | |
git fetch origin master | |
git rebase origin/master | |
# When feature/fix is finished, rebase and squash commits into fewer |
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
git config --global core.editor "mate -w" |
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 user_larstobi { | |
$user = "larstobi" | |
group { "$user": | |
ensure => present, | |
allowdupe => false, | |
} | |
user { "$user": | |
comment => "Lars Tobias Skjong-Borsting", | |
gid => "$user", |
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
file { | |
"/var/spool/gitolite": | |
ensure => directory, | |
owner => "git", | |
group => "git"; | |
"admin.pub": | |
ensure => present, | |
path => "/var/spool/gitolite/admin.pub", | |
content => "ssh-rsa AAAAB3NzaC1...bmhLcxczOQ== admin@example.net"; |
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
For instance Puppet server will not start under RHEL SELinux. Try to start it, then run the following script. Continue this cycle until it starts. It will probably work for different SELinux challenges as well. | |
The script requires: | |
$yum install policycoreutils-python | |
cd /tmp && \ | |
cat /var/log/audit/audit.log | audit2allow -m puppetmaster > puppetmaster.te && \ | |
checkmodule -M -m puppetmaster.te -o puppetmaster.mod && \ | |
semodule_package -m puppetmaster.mod -o puppetmaster.pp && \ | |
semodule -i puppetmaster.pp |
OlderNewer