Skip to content

Instantly share code, notes, and snippets.

View cseeger's full-sized avatar

Chad Seeger cseeger

  • San Francisco, CA
View GitHub Profile
@cseeger
cseeger / storybook_spec.js
Last active February 12, 2019 19:01 — forked from xogeny/storybook_spec.js
Cypress testing of Storybook
describe('Storybook', () => {
beforeEach(() => {
cy.visit('http://airbnb.io/react-dates/')
})
context('DateRangePicker', () => {
it('should visit the default story in this collection', () => {
cy.get('a[data-name="default"]').click()
// Get the iframe for the components and make assertions on that.
@cseeger
cseeger / string.rb
Created March 8, 2017 01:20 — forked from romansklenar/string.rb
Ruby string to boolean type casting
class String
def to_bool
case
when self == true || self =~ /^(true|t|yes|y|1)$/i
true
when self == false || self.blank? || self =~ /^(false|f|no|n|0)$/i
false
else
raise ArgumentError.new "invalid value for Boolean: '#{self}'"
@cseeger
cseeger / decode_session_cookie.rb
Last active March 31, 2016 23:52 — forked from pdfrod/decode_session_cookie.rb
A simple script to decode Rails 4 session cookies
@cseeger
cseeger / e-commerce.md
Created November 26, 2012 03:44 — forked from hjr3/e-commerce.md
Examples of RESTful API calls for E-commerce platforms

Examples of RESTful API calls for E-commerce platforms

These examples are type 3 RESTful API requests and responses. The JSON-HAL specification is used to implement HATEOAS.

Some of the examples are based on my work as architect of the RESTful API at http://www.hautelook.com. All proprietary information has been removed.

Relevant links