This file contains hidden or 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
Customer customer = new Customer(); | |
.... save customer ... | |
Card card = new Card(cardHref); | |
if (card.customer == null) { | |
card.associateToCustomer(customer); | |
} | |
Debit debit = card.debit(...); | |
DebitResult result = from(debit); |
This file contains hidden or 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
{ | |
lineGroupers: [ | |
{ | |
// groups line used to display stats | |
start: "^[^\\s]", | |
continueThrough: "^[\\s]+!" | |
}, | |
{ | |
// try to group lines that do have queries with text data containing newlines. Over simplification. | |
start: "^\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+ UTC", |
This file contains hidden or 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
# | |
# Allows copying ssh keys, directly to vagrant.. quick hack for my needs | |
# | |
# It is basically reading the file, encoding it in base64, pass it in the shell, decode it and write it | |
# in the file with the same name in /home/vagrant, chown it and set 600 permissions | |
def provision_home(config, from, to = nil, user = 'vagrant', permission = "600") | |
if File.exists?(File.join(Dir.home, from)) | |
require "base64" | |
to = to.nil? ? "/home/vagrant/#{from}" : to |
This file contains hidden or 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
require 'etc' | |
ssh_user = Etc.getlogin | |
public_key_path = "~/.ssh/id_dsa.pub" | |
ssh_public_key = File.read(File.expand_path(public_key_path)).strip | |
Vagrant.configure("2") do |config| | |
.... | |
config.vm.provision :shell, :inline => "cat >>/tmp/ssh_key_pub <<EOF\n#{ssh_public_key}\nEOF" | |
config.vm.provision :shell, :inline => "cat >>/tmp/ssh_user <<EOF\n#{ssh_user}\nEOF" |
NewerOlder