Skip to content

Instantly share code, notes, and snippets.

View Marthyn's full-sized avatar

Marthyn Olthof Marthyn

View GitHub Profile
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<Save xmlns="http://www.exactsoftware.com/services/entities/">
<data xmlns:a="http://www.exactsoftware.com/schemas/entities/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Account>
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:services="http://www.exactsoftware.com/services/entities/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:schemas="http://www.exactsoftware.com/schemas/entities/" xmlns:xmlschemainstance="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmlschema="http://www.w3.org/2001/XMLSchema" xmlns:serialization="http://schemas.microsoft.com/2003/10/Serialization/">
<env:Body>
<services:Save>
<services:data>
<schemas:AccountCode>
<schemas:Value> 1126852</schemas:Value>
<schemas:IsDirty>true</schemas:IsDirty>
<schemas:IsNothing>false</schemas:IsNothing>
</schemas:AccountCode>
<% if optinmonster_id_hash %>
  <!-- OptinMonster --><div id="om-<%= optinmonster_id_hash %>-holder"></div><script>
  $(window).load(function () {
  var <%= optinmonster_id_hash %>,<%= optinmonster_id_hash %>_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){<%= optinmonster_id_hash %>_poll(function(){if(window['om_loaded']){if(!<%= optinmonster_id_hash %>){<%= optinmonster_id_hash %>=new OptinMonsterApp();return <%= optinmonster_id_hash %>.init({u:"9819.<%= optinmonster_id_num %>",staging:0,dev:0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src="//a.optinmonster.com/app/js/api.min.js",o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){try{d=om_loaded=true;<%= optinmonster_id_hash %>=new OptinMonsterApp();<%= optinmonster_id_hash %>.init({u:"9819.<%= optinmonster_id_num %>",staging:0,dev:0});o.onload=o.onreadystatechange=null;}catch(t){}}}};(doc
def contact_person_params
params.require(:contact_person).permit(:first_name, :middle_name, :last_name, :phone_number, :title, :initials, :job_description)
end
def account_params
params.require(:account).permit(:starting_company, :turnover, :company_name, :kvk_number, :btw_number, :phone,
:address_postalcode, :address_housenumber, :address_streetname, :address_city,
:invoice_email_address,
:invoice_address_postalcode, :invoice_address_housenumber,
:invoice_address_streetname, :invoice_address_city)

Kiesvoorjezorg Koppeling

How to use

When there's a new or updated Facility in Kiesvoorjezorg, they have to send a POST request to api.gastvrijezorg.nl/api/v1/triggers. In the parameters we expect a code, id of the resource and your source identifier ('kvz') for example. Code 10 is a new Facility, code 20 is an update.

CODES = {
 "10" =&gt; "New",
@Marthyn
Marthyn / Gemfile.lock
Created January 27, 2016 09:32
VMN Gemfile.lock
GIT
remote: git://github.com/wponrails/wp-connector.git
revision: eb0505e634920810e8dfd3cc04b4068e291733a1
tag: v1.3.0
specs:
wp-connector (1.0.0)
faraday
json
rails (>= 4.0.0)
sidekiq (~> 2.17.7)
@Marthyn
Marthyn / Gemfile.lock
Created January 27, 2016 09:29
Upgrade to Rails 4.2.5.1
GIT
remote: git://github.com/hoppinger/capistrano-puma.git
revision: ee6242600e249065e8fead7fc7440723fa18cd24
branch: feature/no_explicit_restart
specs:
capistrano3-puma (1.2.1)
capistrano (~> 3.0)
puma (>= 2.6)
GEM
@Marthyn
Marthyn / shell_functions.sh
Last active August 29, 2015 14:23
Favourite shell functions
yolo() {
git add .
git commit -am 'YOLO'
git push origin $1 -f
}
# Hoppinger release
# Usage `release -v 1.0.1 -e testing`
release() {
git checkout master
@Marthyn
Marthyn / flatuicolors
Created June 12, 2015 08:42
Colors from flatuicolors.com
$turquiose: #1abc9c;
$greensea: #16a085;
$emerald: #2ecc71;
$nephritis: #27ae60;
$peterriver: #3498db;
$belizehole: #2980b9;
$amethyst: #9b59b6;
$wisteria: #8e44ad;
$wetasphalt: #34495e;
$midnightblue: #2c3e50;
Account.all.each do |account|
Apartment::Tenant.switch(account.subdomain)
HeaderImage.destroy_all
User.all.each do |user|
user.update_attributes(avatar:nil)
end
end