Skip to content

Instantly share code, notes, and snippets.

Olivier Roy olivierroy

View GitHub Profile
@olivierroy
olivierroy / payza_m.php
Created Jan 30, 2014
Payza payment option for PancakeApp (system/pancake/modules/gateways/models/payza_m.php)
View payza_m.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* The Payza Gateway
*
* @subpackage Gateway
* @category Payments
*/
@olivierroy
olivierroy / linebreaks.rb
Created Jan 30, 2014
see what a file would look like on Windows
View linebreaks.rb
#!/usr/bin/env ruby
if ARGV.count == 1 && ARGV[0] != 0
contents = File.read(ARGV[0])
puts contents.gsub("\r\n","#VALID_LINE_BREAK#").gsub("\n","").gsub("\r","").gsub("#VALID_LINE_BREAK#", "\r\n")
else
puts "Invalid argument"
end
You can’t perform that action at this time.