Skip to content

Instantly share code, notes, and snippets.

View philipefarias's full-sized avatar

Philipe Farias philipefarias

  • Belo Horizonte, MG, Brazil
  • 14:54 (UTC -03:00)
View GitHub Profile
@brenopoggiali
brenopoggiali / Gemfile
Last active January 30, 2019 17:36
Program that prints the number of lines spoken by each character in "The Tragedy of Macbeth" by Shakespeare to train my Ruby skills
source 'https://rubygems.org'
ruby '2.5.1'
gem "nokogiri", "~> 1.10.1"
@stevenharman
stevenharman / 00_Heroku-Release-Phase-Review-Apps-Rails_README.md
Last active May 23, 2024 04:43
Heroku Release Phase script for managing Rails DB migrations, and playing nice with Review Apps and postdeploy scripts

Heroku Release Phase + Review Apps + Rails

This is a simplified, but fairly thorough, set of scripts and configuration to enable Heroku Release Phase for Rails apps. Further, this particular set up plays nicely with Heroku Review Apps in that the release phase script will:

  1. Fail, loudly, if the DB does not yet exist.
  2. Load the DB schema if the current schema version (as determined by bin/rails db:version) is 0.
  3. Run DB migrations otherwise.

For a "normal" app that usually means it will run the DB migrations.

@przbadu
przbadu / react-on-docker.md
Last active May 12, 2024 15:34
Setup Docker for React development

STEP 2: setup docker to run react app (dev and production) configuration: https://gist.github.com/przbadu/929fc2b0d5d4cd78a5efe76d37f891b6

Setup Docker for React development

Because we are using Docker, we are not going to install node, npm, create-react-app in our development machine, not even for generating create-react-app scaffold.

For this purpose I am using 2-step docker configuration:

  • In first step, we will create a simple docker container, that does only one thing, install create-react-app

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

Things that programmers don't know but should

(A book that I might eventually write!)

Gary Bernhardt

I imagine each of these chapters being about 2,000 words, making the whole book about the size of a small novel. For comparison, articles in large papers like the New York Times average about 1,200 words. Each topic gets whatever level of detail I can fit into that space. For simple topics, that's a lot of space: I can probably walk through a very basic, but working, implementation of the IP protocol.

@tmm1
tmm1 / sample.gif
Last active December 11, 2020 07:40
View Profiler
sample.gif
@willurd
willurd / web-servers.md
Last active May 9, 2025 14:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Pão de queijo do Felix

  • 3 xícaras de polvilho (preferencia azedo, mas pode ser o doce)

  • 3 ovos

  • 100g de queijo ( ou a vontade)

  • 1 copo de leite

@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: