Skip to content

Instantly share code, notes, and snippets.

View BaylorRae's full-sized avatar

Baylor Weathers BaylorRae

View GitHub Profile
import React, { useState, useEffect } from 'react';
import './App.css';
import { firebase } from './config'
function useTimesList(sortDirection='asc') {
const [times, setTimes] = useState([])
useEffect(() => {
const unsubscribe = firebase
def test_ordered_reducer_pattern():
class RandomNumberDependency(Dependency):
def promises(self):
return ['random-number']
def execute(self, context):
context['random-number'] = 5
return context
@BaylorRae
BaylorRae / .vimrc
Created February 2, 2018 04:50
5 tips to improve your vim
" 1) W isn't mapped by default
command! W :w
" 2) force minimun window width
set winwidth=110
" 3) navigate by display lines
noremap j gj
noremap k gk
module Types
ProjectType = GraphQL::ObjectType.define do
name "Project"
description "a project"
implements GraphQL::Relay::Node.interface
global_id_field :id
field :title, !types.String do
Feature: purchase product
Scenario: purchase product
Given seller has created a product
When buyer purchases the product
And buyer sends payment
Then seller should receive money
And the product shouldn't be listed
lp -o media="30323 Shipping Label" -o fit-to-page -o landscape -d DYMO_LabelWriter_450_Turbo "./file.pdf"
Feature: offer price
Scenario: accept offer price
Given I offer a price of "5.75"
When the price is accepted
Then I should be able to send payment
@BaylorRae
BaylorRae / Gemfile
Last active August 29, 2015 14:06
RFQuiltLayout with RubyMotion
gem 'motion-cocoapods'
@BaylorRae
BaylorRae / index.html.erb
Last active August 29, 2015 14:00
Category Links
<% Category.order(:title).each do |category| %>
<%= link_to category.title, category_products_path(category.id) %>
<% end %>
<?php
// http://michelf.ca/projects/php-markdown/
require_once 'markdown.php';
/**
* parses markdown before printing on the page
*
* you could put this in MarkdownCommentParser::comment
* if you wanted to save off the html