Skip to content

Instantly share code, notes, and snippets.

View kylealwyn's full-sized avatar
💾
(☞゚∀゚)☞

Kyle Alwyn kylealwyn

💾
(☞゚∀゚)☞
View GitHub Profile

Typeahead

We're building an open source Typeahead component that will be published to NPM and also used internally. We want to give each team flexibility on how the list options are provided as well as styling the input and list options.

Requirements are as follows:

  1. Teams using the Typeahead component need to be able to provide either a local or remote list of options
    • Example: One team is using our component to filter through a local array of US states and another team is using it to search for users by first and last name via an API endpoint
  2. Teams using our Typeahead component must have the ability to render custom options
    • Example: Our consumer team needs an icon in the option row but our clinical team does not
/* eslint-disable no-param-reassign */
import React from 'react';
const Gutter = 12;
const SIZES = ['', 'xs', 'sm', 'md', 'lg', 'xl'];
const SIZE_MAP = {
xs: 4,
sm: 8,
'': 12,
@kylealwyn
kylealwyn / firebase-sandbox.md
Created August 17, 2017 03:54 — forked from cohenadair/firebase-sandbox.md
Setting up development and production Firebase environments for iOS

Firebase Environments

Last updated: April 21st, 2017.

At the time of writing this gist (January 4th, 2017), I was unable to find true sandboxing to separate development and production environments for a Firebase project. The closest we can get is to create two separate Firebase projects -- one for development and one for production.

Pros

  • Complete separation and isolation of all Firebase features.
  • Freedom to experiment without risking the corruption of production data.

Cons

@kylealwyn
kylealwyn / as-terminate
Created August 15, 2017 22:43 — forked from louiszuckerman/as-terminate
easy ssh access and pruning for EC2 instances in AutoScaling groups. depends on AWS CLI.
#!/bin/bash
if [ "$1" == "-h" ]; then
cat <<END
AWS AutoScaling Termination Helper:
terminate an instance in an auto scaling group
Usage: $0 {group-name}
END
1. Highlight a recommended option,

2. Allow users to switch currency (€/$/£)

3. Allow users to switch pricing monthly/yearly

4. Keep the entire pricing plan area clickable

5. Use slider to calculate how much a user would save

6. Provide free first month for good engagement

7. Prominently highlight testimonials prominently

8. Repeating call to action on top and bottom

9. Sell benefits instead of features

10. Indicate that users can cancel any time


What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@kylealwyn
kylealwyn / 0_reuse_code.js
Created January 18, 2017 22:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kylealwyn
kylealwyn / active-record-migration-expert.md
Created January 13, 2017 01:19 — forked from pyk/active-record-migration-expert.md
become active record migration expert (Rails 4.0.2)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
@kylealwyn
kylealwyn / debounce-and-throttle.js
Last active January 18, 2017 22:20
ES6 versions of popular curried functions
function debounce(fn, delay) {
let timer;
return function(...args) {
clearTimeout(timer);
timer = setTimeout(() => {
fn.apply(this, args);
}, delay);
}
}