Skip to content

Instantly share code, notes, and snippets.

@Pepan
Pepan / command.xml
Created November 23, 2012 10:29
XML response from GoPay
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<createPaymentResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<createPaymentReturn xsi:type="ns1:EPaymentStatus" xmlns:ns1="urn:AxisEPaymentProvider">
<currency xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">CZK</currency>
<encryptedSignature xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
487b6ae7d373b9892eb9a12c75d0b0e54c02b5762e2fdd132a7f2a458eff2da0a34cd33aaae26e3029b4aa4f73cad49f
</encryptedSignature>
<orderNumber xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
@Pepan
Pepan / email_api.php
Created July 16, 2013 14:24
metoda skladajici adresy pro odchozi email
/** JCH
* @param int $p_bug_id
* @param string $p_notify_type
* @param array $p_extra_user_ids_to_email
* @return array
*/
function email_collect_recipients_02($p_bug_id, $p_notify_type, $p_extra_user_ids_to_email = array()) {
$bug_id = db_prepare_int($p_bug_id);
$recipients = array();
require_once("config_inc.php");
@Pepan
Pepan / master.js.coffee
Created August 13, 2013 15:01
simple VLT messages - code in coffeescript: sending messages to server and receive responses, both in JSON
$(document).ready ->
tester = $('nav#tester')
if tester.length > 0
tester.find('a').click (event) ->
$('<div/>',{'class': 'query', html: JSON.stringify($(this).data('json'))}).appendTo('div#tester_commands')
$('div#tester_commands').scrollTop(1000)
$.ajax
dataType: 'json',
url: $(this).attr('href'),
type: $(this).attr('data-method').toUpperCase(),
conf = YAML.load_file('config/mitek.yml')
Bikelink::Application.config.mitek = OpenStruct.new(conf[Rails.env])
@Pepan
Pepan / csv_handler.rb
Last active April 9, 2020 08:31
CSV hanlder
# lib/csv_handler.rb
require 'csv'
module CsvHandler
class Generator
def self.perform
file = CSV.generate do |csv|
yield csv
end