For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
// Simple function to send Weekly Status Sheets to contacts listed on the "Contacts" sheet in the MPD. | |
// Load a menu item called "Project Admin" with a submenu item called "Send Status" | |
// Running this, sends the currently open sheet, as a PDF attachment | |
function onOpen() { | |
var submenu = [{name:"Send Status", functionName:"exportSomeSheets"}]; | |
SpreadsheetApp.getActiveSpreadsheet().addMenu('Project Admin', submenu); | |
} | |
function exportSomeSheets() { |
#!/bin/bash | |
#set url and port to the xbmc box webservice | |
XBMC_HOST="http://127.0.0.1:8080" | |
if [ "$1" = "" ]; then | |
echo -n "Insert URL: " | |
read url | |
else | |
url="$1" | |
fi |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# http://stackoverflow.com/questions/5108876/kill-a-postgresql-session-connection | |
namespace :db do | |
desc "Fix 'database is being accessed by other users'" | |
task :terminate => :environment do | |
ActiveRecord::Base.connection.execute <<-SQL | |
SELECT | |
pg_terminate_backend(pid) | |
FROM | |
pg_stat_activity | |
WHERE |
# rails/rails#18061 | |
# env vars: AR_VERSION (see below for default), TRY_PATCH (default false) | |
system 'rm Gemfile' if File.exist?('Gemfile') | |
$ar_version = ENV['AR_VERSION'] | |
# $ar_version ||= '5.0.0.beta3' # succeeds, patch does not apply (lacks #where_values) | |
$ar_version ||= '4.2.6' # fails, patch works | |
# $ar_version ||= '4.1.15' # fails, patch works | |
# $ar_version ||= '4.0.13' # fails, patch works |
system 'rm Gemfile' if File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'activerecord', | |
'4.2.0.rc3' | |
# '4.1.8' | |
# '4.0.12' | |
# '3.2.21' | |
gem 'sqlite3' | |
GEMFILE |
system 'rm Gemfile' if File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'activerecord', | |
'5.0.1' | |
# '4.2.0' | |
# '4.1.8' | |
# '4.0.12' | |
# '3.2.21' | |
gem 'sqlite3' |
centos-builder
centos-root.fsa
to centos-builder
apt-get install fsarchiver
/dev/nbd1
fsarchiver -v restfs centos-root.fsa id=0,dest=/dev/nbd1
# rubocop:disable Style/DotPosition | |
# rubocop:disable Style/GlobalVars | |
# test Rails 5's ActiveRecord OR | |
system 'rm Gemfile' if File.exist?('Gemfile') | |
$ar_version = ENV['AR_VERSION'] | |
$ar_version ||= '5.0.0.rc1' | |
$try_patch = ENV['TRY_PATCH'] == 'true' | |
$enable_byebug = false |
I hereby claim:
To claim this, I am signing this object: