Skip to content

Instantly share code, notes, and snippets.

View hasannadeem's full-sized avatar
🎯
Focusing

Hasan N. hasannadeem

🎯
Focusing
View GitHub Profile
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active September 21, 2024 00:27
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@philsof
philsof / naming-conventions-for-a-many-to-many-table-and-model-in-rails.md
Last active May 12, 2022 14:37
Naming conventions for a many-to-many join table and model in rails

Migration table naming convention: groups_users

Migration file naming convention (the part of the file name that is not automatically generated): create_groups_users

Model class naming convention: GroupsUser

@koppen
koppen / pre-commit
Created January 25, 2016 08:50
Run rubocop on pre-commit
# .git/hook/pre-commit
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
@tripleee
tripleee / git-wrapper
Last active September 11, 2022 12:29
git-wrapper to protect against accidental usage of a global user.email
#!/bin/sh
:<<'=cut'
=head1 NAME
git-wrapper - avoid committing as you@invalid
=head1 SYNOPSIS