Skip to content

Instantly share code, notes, and snippets.

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

Cameron Wardzala cwardzala

🏠
Working from home
View GitHub Profile
@cwardzala
cwardzala / rails_resources.md
Created August 18, 2014 23:15 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@cwardzala
cwardzala / .editorconfig
Last active August 29, 2015 14:13
Code Standards
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
@cwardzala
cwardzala / Shop Data Models.md
Last active August 29, 2015 14:17
Shop Data Models

Address

  • street {Array/List}
  • city {String}
  • region {String OH|PA|CA}
  • zip {String}
  • country {String CA|US}

AddressExtended

  • name {Object}
  • first {String}
.DS_Store
.svn
*~
*.swp
*.rbc
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
@cwardzala
cwardzala / send_rb_default-autoship.py
Last active August 29, 2015 14:23
RB Email scripts
import os
import mandrill
import sys
import json
prod_key = os.environ.get('MANDRILL_PROD_KEY')
test_key = os.environ.get('MANDRILL_TEST_KEY')
mandrill_client = mandrill.Mandrill(prod_key)

Grid Template Manifest

Living Document

Findaway Working Draft 1 September 2015

Abstract

This specification defines a JSON-based manifest that provides developers with a centralized place to put metadata associated with ILS grid ordering templates. This includes, but is not limited to, the ILS system to be used, and vendor identifier. The manifest allows declaration of default grids with default values. Additionally this manifest declares the column names, and potential values. which can be used to populate the rows of a grid template.

Using this metadata, applications can implement a cross compatible system for reading and writing grid templates. Additionally this can be used to define a format to import and export grid template metadata.

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Play It Forward Return Form</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-bo

Keybase proof

I hereby claim:

  • I am cwardzala on github.
  • I am cwardzala (https://keybase.io/cwardzala) on keybase.
  • I have a public key ASA7dbqVT72iKDDVxQCjCawG_I_ZamCrsnUirOsvaT-xCwo

To claim this, I am signing this object:

let code_types = {};
code_types.cart = (promo, products) => {
let products = productUtils.getProductsByType(products, promo.product_types);
let total = 0;
products.forEach((item) => {
total = total + productUtils.getTotal(item, promo.use_contract_price ? account.org.price_contracts[item.format] : 0);
});
import json
import requests
import codecs
from pprint import pprint
import md5
import mandrill
test_key = 'test_key'
prod_key = 'prod_key'
mandrill_client = mandrill.Mandrill(test_key)