Skip to content

Instantly share code, notes, and snippets.

@smcavinney
smcavinney / rjpusher.rb
Created November 19, 2014 15:04
RJ_pusher
require 'rjmetrics_client'
require 'CSV'
require 'digest/md5'
require 'benchmark'
require 'json'
require 'crack'
require 'net/http'
rj_client = RJMetricsClient.new([CID], "[IMPORT API KEY]")
@smcavinney
smcavinney / gist:b5eb9765869f55b2c616
Created November 12, 2014 22:36
Vandalay Subscription data hack
# I'm not sure why I have so many conversions to integers for numbers. I'm guessing that I had one error and it was 4 am and I went overboard.
require 'csv'
# user's table from vandelay
full_users = CSV.read("/Users/smcavinney/Desktop/customers.csv")
subscription_users = []
#popping in 5000 all time subscribers
while subscription_users.count < 5000
a_user = full_users.sample
subscription_users << a_user unless subscription_users.include?(a_user)

Keybase proof

I hereby claim:

  • I am smcavinney on github.
  • I am smcavinney (https://keybase.io/smcavinney) on keybase.
  • I have a public key whose fingerprint is 462F 46B8 53FD 6B33 7708 2060 2D7D 62DD 563C 1340

To claim this, I am signing this object:

Magento SOAP API

  1. Login to the Magento Admin panel (ex http://example/magento/admin)
  2. Enter System -> Web Services -> SOAP/XML-RPC - Roles
  3. Click 'Add New Role' and enter a name for the role (ex. RJMRole) and click 'Save Role'
  4. Click Role Resources and change the dropdown selection from Custom to All and click 'Save Role'
  5. Enter System -> Web Services -> SOAP/XML-RPC - Users
  6. Click 'Add New User' and fill in the user form. Remember the username and API-Key. We need these credentials to access your API and click 'Save User'
  7. Click User Role and select the Role you created in step 3 then click Save User

Magento SOAP API

  1. Login to the Magento Admin panel (ex http://example/magento/admin)
  2. Enter System -> Web Services -> SOAP/XML-RPC - Roles
  3. Click 'Add New Role' and enter a name for the role (ex. RJMRole) and click 'Save Role'
  4. Click Role Resources and change the dropdown selection from Custom to All and click 'Save Role'
  5. Enter System -> Web Services -> SOAP/XML-RPC - Users
  6. Click 'Add New User' and fill in the user form. Remember the username and API-Key (this is your password) we need these credentials to access your API and click 'Save User'
  7. Click User Role and select the Role you created in step 3 then click Save User
@smcavinney
smcavinney / show.html
Created December 10, 2012 23:21
Page source of blank map. Google js is included at the footer.
<!DOCTYPE html>
<html>
<head>
<title>Pet Sit</title>
<meta name="description" content="Pro PetSit">
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/bootstrap_and_overrides.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/gmaps4rails.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/pricing.css?body=1" media="all" rel="stylesheet" type="text/css" />