Skip to content

Instantly share code, notes, and snippets.

View gaygenius's full-sized avatar

José J. Capó gaygenius

  • San Francisco, CA
View GitHub Profile
@gaygenius
gaygenius / a_kind_of_spec.rb
Last active May 3, 2017 23:16
Correct use of rspec matching
describe 'Expectations' do
it 'fails with the wrong expectations' do
my_hash = { 'created_at' => Time.now }
expect(my_hash['created_at']).to be_a_kind_of(Time)
# expect(my_hash)
# .to eql({ 'created_at' => a_kind_of(Time) })
# expect(my_hash)
# .to eq({ 'created_at' => a_kind_of(Time) })
@gaygenius
gaygenius / nextjs-typescript.md
Last active February 15, 2020 17:41
Next.js with TypeScript

Next.js with TypeScript

setup

npm init next-app ~/code/next-ts && code ~/code/next-ts
npm i -D typescript @types/react @types/node
git rm -f index.js
@gaygenius
gaygenius / docker-tour.md
Created February 21, 2020 18:52
# Docker tour (Python web app with Redis service)

Docker tour (Python web app with Redis service)

From Docker docs — Get started

concepts

Stack
A group of interrelated services that share dependencies, can be orchestrated and scaled together (e.g., add visualizer and redis services).
Swarm
@gaygenius
gaygenius / index.html
Last active March 27, 2020 00:17
Move object with buttons
<div id="container"></div>