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 / X3G-4601.py
Created September 27, 2016 18:44
null created by anonymous - https://repl.it/X3G/4601
#/usr/bin/env python
import re
import json
def slugify(title):
title = title.lower()
empties = re.compile('[-\\s]+')
title = empties.sub('-', title)
odds = re.compile('[^\w\s-]')
title = odds.sub('', title)
@cwardzala
cwardzala / cs_range_parse.js
Last active September 22, 2016 17:16
Parsing CloudSearch range facets
const csRangeParse = (value) => {
return value.replace(/(\[|\]|\})/g, '').trim().split(',');
};
{this.props.list.map(listValue => {
if (typeof listValue === 'object') {
return <li key={listVlaue.name}>
{listValue.name}
<BulletedList list={listValue.list} />
</li>;
}
return <li key={ listValue }>{ listValue }</li>;
})}
<?xml version="1.0"?>
<root>
<item>
<name>Buttons 4 &amp; 5(Left/Right)</name>
<appendix>(You can switch Desktop by Mouse Button 4/5 left/right.)</appendix>
<identifier>private.buttons_4_5_left_right</identifier>
<autogen>
__KeyToKey__
PointingButton::BUTTON5 | ModifierFlag::NONE,
KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_R
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)
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);
});

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:

<!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

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.

@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)