Skip to content

Instantly share code, notes, and snippets.

View yurighensev's full-sized avatar

Yuri Ghensev yurighensev

View GitHub Profile
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active June 6, 2025 20:27
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@lucaschain
lucaschain / functional_quick_sort.js
Last active April 29, 2020 16:25
Functional Javascript Quick Sort
const filter = (list, predicate) => list.filter(predicate)
const filterLessThan = (list, value) => filter(list, item => item < value)
const filterGreaterOrEqualThan = (list, value) => filter(list, item => item >= value)
const quickSort = ([head, ...tail]) => head === undefined ? [] : [
...quickSort(filterLessThan(tail, head)),
head,
...quickSort(filterGreaterOrEqualThan(tail, head))
@naupaka
naupaka / pr_etiquette.md
Created December 15, 2017 01:50 — forked from mikepea/pr_etiquette.md
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@lucaschain
lucaschain / errou_formatter.rb
Last active August 20, 2018 15:13
Fausto Silva's "errou" formatter
class CustomFormatter < RSpec::Core::Formatters::BaseTextFormatter
RSpec::Core::Formatters.register self, :example_passed, :example_pending, :example_failed
def initialize(*args)
super(*args)
@index = 0
end
def increase_index!
@index += 1