Skip to content

Instantly share code, notes, and snippets.

View jhannes's full-sized avatar

Johannes Brodwall jhannes

View GitHub Profile
@joerichsen
joerichsen / gist:657153
Created October 31, 2010 21:06
Querying the e-conomic.dk API using Savon and Ruby
# 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
@jhannes
jhannes / FcmSender.java
Last active June 23, 2021 20:09
Firebase Cloud Messaging sender client in java
import org.jsonbuddy.JsonNode;
import org.jsonbuddy.JsonObject;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;