Skip to content

Instantly share code, notes, and snippets.

@arachnafobic
arachnafobic / secret_token.rb
Last active December 29, 2015 17:49
config/initializers/secret_token.rb
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure your secret_key_base is kept private
@arachnafobic
arachnafobic / _nagios with nginx on ubuntu_
Last active November 21, 2017 00:33
nagios with nginx on ubuntu 12.04.3 LTS
- Setting up nagios server on Ubuntu 12.04.3 LTS
This describes how to setup a nagios server with nginx
and configure various checks.
The checks are specific to my needs, your millage may vary.
== Install the required packages ==
== w/ sudo ==
- Setting up nagios nrpe client on Ubuntu 12.04.3 LTS
This describes how to setup a nagios nrpe with autossh
tunneling to communicate with the nagios server, and
configure various checks.
The checks are specific to my needs, your millage may vary.
== Install the required packages ==
== w/ sudo ==
@arachnafobic
arachnafobic / Vagrantfile
Created January 17, 2014 15:37
Vagrantfile for multiple VMs that have both access to the internet thru NAT and can see eachother host only. Also makes it so the share folder doesn't share the entire VM.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'fileutils' ; FileUtils.mkdir_p 'shared'
Vagrant::Config.run do |config|
config.vm.define :vm1 do |config|
config.vm.share_folder 'v-root', '/vagrant', 'shared'
config.vm.box = "precise64"
config.vm.network :hostonly, "192.168.99.2"
# Build script for jenkins
set -xe
export GEM_HOME=/var/lib/jenkins/.gem/ruby/1.9.1
export PATH=$GEM_HOME/bin:$PATH
export RAILS_ENV=test
# Clean up previous gembuilds
rm -Rf /var/lib/jenkins/.gem/ruby/1.9.1/gems
rm -Rf /var/lib/jenkins/.gem/ruby/1.9.1/bin
- Setting up gerrit server on Ubuntu 12.04 LTS
This describes how to setup a gerrit server.
== Install the required packages ==
== w/ sudo ==
- if you are in a VM without swap, add some :
- Setting up calendarserver on Ubuntu 12.04 LTS
This describes how to setup a calendarserver with openldap
authentication.
The setup is specific to my needs, your millage may vary.
Afterwards the setup should be as followed :
- A running LDAP server, able to authenticate calendar users
and maintain groups. Communicating with it's clients on TLS
- A running calendar server, serving contents on SSL
#!/bin/bash
umask 0022
export RAILS_ENV=production
cmds=(
'bundle install --without development:test'
'bundle exec rake db:migrate'
'bundle exec rake assets:precompile'
)
@arachnafobic
arachnafobic / gist:9530958
Created March 13, 2014 15:47
how to get guestproperties from every vm on a host
vboxmanage list vms | sed -r 's/^"(.*)" \{(.*)\}$/\1 \2/' | xargs -n 2 sh -c 'echo -n "$1 ($2): "; vboxmanage guestproperty get $2 /VirtualBox/GuestAdd/Version' sh
deb http://apt.postgresql.org/pub/repos/apt precise-pgdg main