- create a scaleway instance, let's call it
centos-builder
- Ubuntu Trusty on a C2S is ok
- make sure to add an additional 50gb volume
- upload
centos-root.fsa
tocentos-builder
- install FSArchiver
apt-get install fsarchiver
- extract it on
/dev/nbd1
fsarchiver -v restfs centos-root.fsa id=0,dest=/dev/nbd1
- shut the machine down from Scaleway's web UI
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
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' |
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
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 |
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
# 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 |
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
# 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 |
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
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
#!/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 |
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
// 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() { |
NewerOlder