Skip to content

Instantly share code, notes, and snippets.

View pegler's full-sized avatar

Matt pegler

View GitHub Profile
def create_cust_tag_node(doc, root_node, pm_cust_id, esp_cust_id)
cust = doc.create_element 'customer'
[line 242] a = doc.create_element "node_name", "node_content"
a.content = pm_cust_id
cust.add_child(doc.create_element('pmCustID', pm_cust_id))
cust.add_child(doc.create_element 'espCustID', esp_cust_id)
cust.add_child(doc.create_element 'custAcceptYN', 'Y')
root_node.add_child(cust)
cust
require 'rubygems'
require 'savon'
class ABSService
WSDL = 'wsdl URL'
def self.client
@@client = Savon::Client.new WSDL
end
@pegler
pegler / gist:1749956
Created February 6, 2012 05:37
Site Maintenance Apache Configuration
RewriteEngine on
RewriteCond /var/www/mysite.com/down -f
RewriteCond %{REQUEST_URI} !^/static/.*
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ - [R=503]
ErrorDocument 503 /maintenance.html
Alias /maintenance.html /var/www/mysite.com/environments/site/src/mysite/static/maintenance.html

Keybase proof

I hereby claim:

  • I am pegler on github.
  • I am pegler (https://keybase.io/pegler) on keybase.
  • I have a public key whose fingerprint is 0E17 0EDE 1090 73DF D7F7 2A4B F545 F705 C36C 4C07

To claim this, I am signing this object:

Sudoku from here: http://www.telegraph.co.uk/news/science/science-news/9359579/Worlds-hardest-sudoku-can-you-crack-it.html
Solver: https://github.com/Doppp/LHL-Sudoku-Solver/blob/master/Sudoku2.cpp
Output:
Row[1] : 800000000
Row[2] : 003600000
Row[3] : 070090200
Row[4] : 050007000