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
Inicia la sessió <a href="http://www.equipsport.cat">Equipsport.cat</a> | |
<form accept-charset="UTF-8" action="http://www.equipsport.cat/sessions" method="post" target="_blank"> | |
<label for="username">Nom d'usuari</label> | |
<input class="textfield" id="username" name="username" type="text"> | |
<label for="password">Contrasenya</label> | |
<input class="textfield" id="password" name="password" type="password"> | |
<input type="submit" value="Inicia la sessió"> | |
<a href="http://www.equipsport.cat/forgot_password">Has oblidat la contrasenya?</a> | |
</form> |
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
Log på <a href="http://www.holdsport.dk">Holdsport</a> | |
<form accept-charset="UTF-8" action="http://www.holdsport.dk/sessions" method="post" target="_blank"> | |
<label for="username">Brugernavn</label> | |
<input class="textfield" id="username" name="username" type="text"> | |
<label for="password">Adgangskode</label> | |
<input class="textfield" id="password" name="password" type="password"> | |
<input type="submit" value="Log på"> | |
<a href="/forgot_password">Glemt adgangskode?</a> | |
</form> |
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
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = 'parallel_assets_compiler' | |
s.version = '0.2.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jørgen Orehøj Erichsen' | |
s.email = 'joe@erichsen.net' | |
s.summary = 'Compile assets in parallel' | |
s.description = 'Compile assets in parallel to speed up deployment' |
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
# Old version is here | |
# https://gist.github.com/657153 | |
# In Gemfile | |
gem 'savon', :git => 'http://github.com/rubiii/savon.git', :branch => 'eight' | |
gem 'httpclient' | |
# Run this in the console to fetch the name and address of the first debtor | |
HTTPI::Adapter.use = :net_http | |
client = Savon::Client.new do |
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
# In Gemfile | |
gem 'savon', :git => 'http://github.com/rubiii/savon.git', :branch => 'eight' | |
gem 'httpclient' | |
# Run this in the console to fetch the name and address of the first debtor | |
client = Savon::Client.new do | |
wsdl.document = "https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL" | |
end | |
# Authenticate |
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/sh | |
find . -name '*.pdf' | cut -f 2- -d '.' | xargs -I {} echo `pwd`{} | xargs -I {} echo 'tell application "Evernote" to create note from file "{}"' | /usr/bin/osascript |
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
require 'savon' | |
client = Savon::Client.new "http://aws.hvm.dk/GetAddressService/GetAddressService.asmx?wsdl" | |
# Show the methods available | |
client.wsdl.soap_actions | |
# [:get_post_code_list, :get_address_access_by_street_code, :get_region_list, :get_address_access_by_named_street_uid, :get_municipality_by_municipality_code, :get_address_access_by_uid, :get_municipality_list, :get_address_specific_by_address_access_uid, :get_named_street_by_street_code, :get_post_code_by_post_code_identifier, :get_named_street_by_uid] | |
# Get an array of region names | |
client.get_region_list.to_hash[:get_region_list_response][:region].map { |region| region[:region_name] } | |
# Result ["Nordjylland", "Midtjylland", "Syddanmark", "Hovedstaden", "Sj\303\246lland"] |
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
# Get a sorted list of Danish zipcodes using the webservice described here | |
# http://www.ebst.dk/aws | |
# | |
# Install savon with: gem install savon and try it out | |
require 'savon' | |
client = Savon::Client.new "http://aws.hvm.dk/GetAddressService/GetAddressService.asmx?wsdl" | |
puts client.get_post_code_list.to_hash.values.first[:postal_code_list].map { |postal_code_entry| postal_code_entry[:post_code_identifier] + " " + postal_code_entry[:district_name] }.sort.join("\n") |
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
response = Net::HTTP.post_form(URI.parse('http://www.cpsms.dk/sms/'), | |
{'username' => username, 'password' => password, | |
'recipient' => user.preference.sms_no, | |
'message' => 'Dejlig sms fra os', | |
'from' => 'FraOs', | |
'utf8' => 1, | |
'url' => "http://eksempel.dk/sms" | |
}) |
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
require 'test/unit' | |
require 'test/unit/testresult' | |
Test::Unit.run = true | |
module Hydra #:nodoc: | |
# Hydra class responsible for running test files. | |
# | |
# The Runner is never run directly by a user. Runners are created by a | |
# Worker to run test files. | |
# |
NewerOlder