Skip to content

Instantly share code, notes, and snippets.

View patrickclery's full-sized avatar

Patrick Clery patrickclery

View GitHub Profile
### PR Checklist
- [ ] **Review code coverage report (CodeCov)**
* Has coverage gone up or down with this feature?
* Do we need to add or update tests?
- [ ] **Merge from dev to feature branch** and resolve any merge conflicts
- [ ] **Review CodeClimate** report and improve where possible
@patrickclery
patrickclery / github_guide.md
Last active April 30, 2020 13:34
Behavior-Driven Development Workflow on Github

TL;DR

(Everything you need to know about Behavior Driven Development on Github can be summed up in this snippet of code.)

RSpec.describe Ticket, type: :model do

  it { should validate_presence_of :issue }
  it { should validate_presence_of :pseudo_code }
 it { should be_designated_a(Priority) }
@patrickclery
patrickclery / .gitignore
Created December 26, 2018 22:26
.gitignore for Rails Projects
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Gem related
@patrickclery
patrickclery / docker-compose.yml
Last active April 17, 2019 05:13
docker-compose.yml snippets
aptcache:
container_name: aptcache
hostname: aptcache
image: sameersbn/apt-cacher-ng:3.1-2
networks:
- razornet
ports:
- 3142:3142
restart: always
@patrickclery
patrickclery / scratch_7.rb
Created December 28, 2019 22:52
Write a Ruby program to output the lowest 10 positive integers where the sum of the digits of each integer equals 10 and that contain the number 7 as one of the digits. For instance: The integer 1171 - its digits add up to 10 and it contains a 7
###############################################################################
# Write a Ruby program to output the lowest 10 positive integers where the sum of the digits of each integer equals 10 and that contain the number 7 as one of the digits. For instance: The integer 1171 - its digits add up to 10 and it contains a 7
class App
def self.call
found_numbers = []
1.upto(Float::INFINITY) do |num|
next unless num.to_s.match(/7/)
found_numbers << num if num.to_s.split('').map(&:to_i).sum === 10
break if found_numbers.size == 10
@patrickclery
patrickclery / patrickclery.md
Last active January 6, 2024 15:39
The professional resume of Patrick Clery, Ruby on Rails Developer.

PATRICK CLERY - Ruby on Rails Developer

I'm a freelance web developer of over twenty years who builds single-page apps using Ruby on Rails & React.JS.

Whether you're looking to start a new project, add features to an existing one, or add an experienced developer to your team -- I can do it.

/bin/bash -c "/Users/patrick/.rvm/bin/rvm ruby-2.7.1@Lexop do /Users/patrick/.rvm/rubies/ruby-2.7.1/bin/ruby /Users/patrick/Projects/lexop/bin/rails 'data:migrate'"
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.2-compliant syntax, but you are running 2.7.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
**************************************************
⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis.
**************************************************
== 20200818192252 CopyDebtorsToDebt: migrating ================================
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
@patrickclery
patrickclery / karabiner.json
Created December 12, 2020 03:59
karabiner keys for Magnets MacOS
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
# 2020-03-03 Organization Sent this message by Campaign ABC: "You owe $66" <-- this is the
# "campaign message" object
#
# 2020-03-05 Debtor said: "Hey there - I paid this online yesterday"
#
# 2020-03-05 conversation marked as "requires attention". <-- could be hidden/implied and not
# shown
#
# 2020-03-06 Organization said: "We received the update, thanks! Will mark this as resolved."
# ^^^ "campaign message" object, this is just a "reply".
@patrickclery
patrickclery / how-to-design-a-full-stack-feature-in-pairs.md
Last active May 14, 2021 02:13
How to design a full stack feature in pairs

How to design a full stack feature in pairs

How to work on frontend/backend without relying on each other's work

STEP 1: Define how the request/response flow works between the frontend at every step.

The Problem: One common issue that can arise is a form needs to be designed before the backend can test their controller... OR an API endpoint on the backend needs to be functioning before a frontend can test if their request works.

If you're building a backend feature, for example a Webhook for the Twilio API, then you can go into their Dashboard, test your webhook, and you don't have to worry about this kind of thing.