Original text from http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.html
From: Mark Jason Dominus <[email protected]>
Date: Jul 28, 2005 11:16 PM
Subject: Re: HOP -vs- SICP
| #!/bin/bash | |
| set -e | |
| set -u | |
| CI_MASTER_URL="http://ci-1" | |
| node_online() { | |
| curl --silent "$CI_MASTER_URL/computer/$1/api/json" | grep --silent '"temporarilyOffline":false' | |
| } |
| Copyright (C) 2011 by Colin MacKenzie IV | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in |
| module AuthHelper | |
| def http_login | |
| user = 'username' | |
| pw = 'password' | |
| request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
| end | |
| end | |
| module AuthRequestHelper | |
| # |
Original text from http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.html
From: Mark Jason Dominus <[email protected]>
Date: Jul 28, 2005 11:16 PM
Subject: Re: HOP -vs- SICP
| #!/usr/bin/env bash | |
| # Compress MySQL tables on disk. | |
| # Author: Andrew Berry, [email protected] | |
| # | |
| # Compress all tables in a MySQL InnoDB database using compression from the | |
| # Barracuda table format. Tables have to already be in the Barracuda file | |
| # format to actually compress tables, otherwise the table setting is ignored. | |
| # | |
| # innodb_file_per_table = 1 MUST be set in my.cnf for compression to work. |
| describe LeadService do | |
| LeadService.configure(:test) do | |
| before { settings.set(:instance, self) } | |
| end | |
| # Required for Rack::Test | |
| # | |
| def app | |
| LeadService |
| # Start the old vagrant | |
| $ vagrant init centos-6.3 | |
| $ vagrant up | |
| # You should see a message like: | |
| # [default] The guest additions on this VM do not match the install version of | |
| # VirtualBox! This may cause things such as forwarded ports, shared | |
| # folders, and more to not work properly. If any of those things fail on | |
| # this machine, please update the guest additions and repackage the | |
| # box. |
| # Description: | |
| # spit out random meme images | |
| # | |
| # Dependencies: | |
| # None | |
| # | |
| # Configuration: | |
| # None | |
| # | |
| # Commands: |
| Renew Puppet CA cert. | |
| Not the perfect idea, but should alleviate the need to resign every cert. | |
| What you need from existing puppet ssl directory: | |
| ca/ca_crt.pem | |
| ca/ca_key.pem | |
| Create an openssl.cnf: | |
| [ca] |