Skip to content

Instantly share code, notes, and snippets.

Christoph Klocker corck

Block or report user

Report or block corck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@corck
corck / create_and_upload_ami
Created Mar 26, 2012
Create and upload AMI - Rake task
View create_and_upload_ami
desc "create ami bundle and upload it to s3"
task :create_and_upload_bundle do |channel, stream, data|
set :user, 'app'
message = "Please enter platform [i386|x86_64]"
platform = Capistrano::CLI.ui.ask(message)
message = "Please enter a bundle name:"
bundle_name = Capistrano::CLI.ui.ask(message)
sudo "rm -r /mnt/image; true"
sudo "ec2-bundle-vol -e /volume1,/volume2 -d /mnt -k ~/.ssh/XXXXX.pem -c ~/.ssh/cert-XXXXX.pem -u USERID -r #{platform}"
#sudo "ec2-bundle-vol -d /mnt -k ~/.ssh/XXXXX.pem -c ~/.ssh/cert-XXXX.pem -u USERID -r #{platform}"
View country-list-german.html
<select name="country">
<option value="DE" selected>Deutschland</option>
<option value="AT">Österreich</option>
<option value="CH">Schweiz</option>
<optgroup label="A">
<option value="AF">Afghanistan</option>
<option value="EG">Ägypten</option>
<option value="AX">Åland</option>
<option value="AL">Albanien</option>
<option value="DZ">Algerien</option>
View list_of_countries.rb
COUNTRIES = [
"Afghanistan",
"Aland Islands",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",
"Antarctica",
View devise.de.yml
de:
errors:
messages:
not_found: "nicht gefunden"
already_confirmed: "wurde bereits bestätigt"
not_locked: "war nicht gesperrt"
devise:
omniauth_callbacks:
success: 'Sie wurden erfolgreich eingeloggt.'
@corck
corck / AWS - EBS Snapshot Management
Created Nov 28, 2010
Simple script for creating snapshots of an EBS volume and keeping a certain number of those
View AWS - EBS Snapshot Management
#!/usr/local/bin/ruby
require 'AWS'
require 'yaml'
class SnapshotManagement
# initalize class, optional override path to yml file
# * options [String] :path ('')
#
def initialize(params = {})
View gist:369045
#!/usr/bin/env ruby
require 'open-uri'
require 'rexml/document'
require 'rexml/xpath'
url = 'http://rpm.newrelic.com/accounts.xml?include=application_health'
headers = {'x-license-key' => 'YOUR LICENSE KEY'}
You can’t perform that action at this time.