Skip to content

Instantly share code, notes, and snippets.

View robwierzbowski's full-sized avatar

Rob Wierzbowski robwierzbowski

View GitHub Profile
@robwierzbowski
robwierzbowski / UserSummary.html
Last active November 2, 2017 02:57
UserSummary template example
<article styleName="userSummary --compact">
<img styleName="image -loading" src="/low-res.jpg" />
<div styleName="firstName">Mr. Jim</div>
<div styleName="lastName">Business</div>
</article>
@robwierzbowski
robwierzbowski / reset.css
Last active November 2, 2017 03:20
Reset stylesheet example. Uses PostCSS nesting.
/*
Reset text elements for easy semantic use.
http://anthonyshort.me/global-typographic-styles-suck/
*/
/* Pseudo */
:focus {
outline: none;
}
@robwierzbowski
robwierzbowski / set.css
Last active November 2, 2017 03:20
Set stylesheet example. Uses PostCSS nesting and simple variables.
/*
Set default element styles
Based partially on sanitize.css v2.0.0
github.com/jonathantneal/sanitize.css
*/
*,
::before,
::after {
box-sizing: border-box;
@robwierzbowski
robwierzbowski / non-additive.scss
Last active November 2, 2017 05:53
Example of non-additive styes
.userPreview {
border: 5px solid $off-black;
font-size: 1.5rem;
background: $light-gray;
&.--compact {
border: 1px solid $off-black;
font-size: 1rem;
background: transparent;
}
@robwierzbowski
robwierzbowski / additive.scss
Last active November 2, 2017 05:54
Example of additive styles
.userPreview {
border: solid $off-black;
&.--default {
border-width: 5px;
font-size: 1.5rem;
background: $light-gray;
}
&.--compact {
@robwierzbowski
robwierzbowski / mixins.scss
Last active November 2, 2017 06:44
PostCSS mixin example
/* type.css */
@import 'vars.css';
@define-mixin header {
font-family: $font-sans;
font-weight: 600;
letter-spacing: -0.01em;
}
@robwierzbowski
robwierzbowski / index.js
Last active November 15, 2017 16:52
No `sort()` anagram tester
// Takes two strings.
// Returns true if they're anagrams, false if not.
function isAnagram (a, b) {
const remove = (string, pattern) => string.replace(new RegExp(pattern, 'ig'), '');
// Discard whitespace; anagrams can be different numbers of words
let lettersA = remove(a, '\\s');
let lettersB = remove(b, '\\s');
@robwierzbowski
robwierzbowski / contributing.md
Last active January 24, 2018 19:15
Simple rules for contributing to GitHub repositories. Edits encouraged.

Hi! Thanks for using this project. I had a lot of fun building it, and I hope you're having fun using it too.

If you have an error or support request

  • Read the error message and documentation.
  • Search existing issues, closed issues, and the internet first.
  • If the issue is with a dependency of this project, post on the dependency's repo.
  • If you can fix the issue, submit a PR 👍 💃 💃 🚀.
  • If the issue persists, post on the issue tracker. Include any information that could help others reproduce and fix.
version: 2.1
###################
# SHARED COMMANDS #
###################
cache_key: &cache_key dependency-cache-{{ checksum "yarn.lock" }}
# Docker build environment images
build_env: &build_env
image: cimg/node:current-browsers
# frozen_string_literal: true
# Collector for v2 "atomic" events. This is currently a bare-minimum implementation
# for v2 event steel-threads. These events should not yet be used for any production
# data processing.
class Api::V2::EventsCollectorController < Api::ApiController
# Client-auth data is being used to add client-id to our event payloads
include StitchFix::ClientFacingAuth::ControllerHelpers
include StitchFix::Logger::Logging