Skip to content

Instantly share code, notes, and snippets.

View adamtait's full-sized avatar
🏠
Working from home

Adam Tait adamtait

🏠
Working from home
View GitHub Profile
@adamtait
adamtait / ImportJSON
Created September 7, 2020 01:03
fork of https://github.com/bradjasper/ImportJSON with query string encoding support
/*====================================================================================================================================*
ImportJSON by Brad Jasper and Trevor Lohrbeer
====================================================================================================================================
Version: 1.5.0
Project Page: https://github.com/bradjasper/ImportJSON
Copyright: (c) 2017-2019 by Brad Jasper
(c) 2012-2017 by Trevor Lohrbeer
License: GNU General Public License, version 3 (GPL-3.0)
http://www.opensource.org/licenses/gpl-3.0.html
------------------------------------------------------------------------------------------------------------------------------------
Verifying my Blockstack ID is secured with the address 1KDEda7tGUvdu7cKHMjwdXuy5nLH77GQcR https://explorer.blockstack.org/address/1KDEda7tGUvdu7cKHMjwdXuy5nLH77GQcR
@adamtait
adamtait / blockstackid.txt
Created March 28, 2017 10:57
Blockstack ID - adamtait.id
Verifying that "adamtait.id" is my Blockstack ID. https://onename.com/adamtait
@adamtait
adamtait / keybase.md
Created December 4, 2014 23:31
keybase.md

Keybase proof

I hereby claim:

  • I am adamtait on github.
  • I am adamtait (https://keybase.io/adamtait) on keybase.
  • I have a public key whose fingerprint is 3AAA 2E2F FC30 4A1E 9F5A 692B 81C0 2623 68C7 1224

To claim this, I am signing this object:

@adamtait
adamtait / JS4PHProxy
Created September 15, 2011 12:48
JavaScript SendRequest for use with PHP proxy
function SendRequest ( request, responseHandler, error ){
var content = { url: "http://test.expanz.com/portal/ESAService.svc/restish/ExecAnonymousX",
data: request
};
$.ajax({
type: 'POST',
url: '~/proxy.php',
crossDomain: true,
@adamtait
adamtait / Expanz.test.portal.2011.09.12
Created September 13, 2011 01:52
cURL to Expanz portal endpoint
~: curl -F "<ExecAnonymousX xmlns=\"http://www.expanz.com/ESAService\"><site>SFTEST</site><xml><ESA><Activity id=\"ERP.AnonymousTransaction\"><Method name=\"FindARetailer\" id=\"productId\" value=\"269\" /><Delta id=\"postCode\" value=\"2000\" /><Delta id=\"radius\" value=\"20\" /></Method></Activity></ESA></xml></ExecAnonymousX>" -H "Content-Type: text/xml" http://test.expanz.com/portal/ESAService.svc/restish/ExecAnonymousX
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Request Error</title>
<style>BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:acti
@adamtait
adamtait / Expanz.test.portal.2011.09.12
Created September 13, 2011 01:31
cURL to Expanz portal endpoint
/html>~: curl -F "<ExecAnonymousX xmlns=\"http://www.expanz.com/ESAService\"><site>SFTEST</site><xml><ESA><Activity id=\"ERP.AnonymousTransaction\"><Method name=\"FindARetailer\" id=\"productId\" value=\"269\" /><Delta id=\"postCode\" value=\"2000\" /><Delta id=\"radius\" value=\"20\" /></Method></Activity></ESA></xml></ExecAnonymousX>" -H "Content-Type: text/xml" http://test.expanz.com/portal/ESAService.svc/restish/ExecAnonymousX
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Request Error</title>
<style>BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; }
@adamtait
adamtait / railsissmart.log
Created July 30, 2011 23:11
Rails is smart! Knows plurals in english
~/workspace/rails/happenedtome: ruby script/generate scaffold story title:text body:text
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/stories
exists app/views/layouts/
exists test/functional/
exists test/unit/
create test/unit/helpers/
exists public/stylesheets/