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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'treetop' | |
require 'active_support/all' | |
Treetop.load 'mt940' | |
parser = MT940Parser.new | |
parser.parse(':61:foo:86:bar:86:bza:61:baz:61:fogoo').elements.each do |st| | |
st.elements.each do |st| |
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
{ | |
"extractors": [ | |
{ | |
"condition_type": "string", | |
"condition_value": "sudo:", | |
"converters": [], | |
"cursor_strategy": "copy", | |
"extractor_config": { | |
"regex_value": "sudo:\\s+(\\S+)\\s+:" | |
}, |
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
#!/usr/bin/env ruby | |
require 'em-websocket' | |
require 'thor' | |
module Handler | |
def initialize(args) | |
@ws = args | |
end | |
def receive_data(data) |
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
ActiveSupport::Notifications.subscribe("skrill_psp:request") do |*args| | |
event = ActiveSupport::Notifications::Event.new(*args) | |
Rails.logger.info "[PUMA payload] #{event.payload[:payload]}" | |
Rails.logger.info "[PUMA response] #{event.payload[:response]}" | |
end |
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
# | |
# Author:: Tim Dysinger (<[email protected]>) | |
# Author:: Benjamin Black (<[email protected]>) | |
# Author:: Christopher Brown (<[email protected]>) | |
# Copyright:: Copyright (c) 2009 Opscode, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
NewerOlder