Skip to content

Instantly share code, notes, and snippets.

View hasannadeem's full-sized avatar
🎯
Focusing

Hasan N. hasannadeem

🎯
Focusing
View GitHub Profile
@hasannadeem
hasannadeem / 42-things.md
Created May 13, 2022 07:30 — forked from SabretWoW/42-things.md
42 Sweet, sweet things Rails (and Ruby) can do. Wonderful reference.
@hasannadeem
hasannadeem / git-wrapper
Created November 23, 2021 14:46 — forked from tripleee/git-wrapper
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
@hasannadeem
hasannadeem / pre-commit
Created November 23, 2021 14:33 — forked from koppen/pre-commit
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'
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@hasannadeem
hasannadeem / channel_list.rb
Last active January 25, 2021 14:54
Event Management Service with RSpect
class Slack::ChannelList
def initialize(organization)
@client = Slack::Web::Client.new(token: organization.slack_token)
end
def self.call(organization:)
new(organization).call
end
@hasannadeem
hasannadeem / ruby-rails-machine-setup-guide.md
Last active March 22, 2023 14:16
Ruby/Rails Machine Setup Guide.md

1- IDE

We prefer to use sublime/VS Code for development(you can opt for any IDE though, but that will mean no support from seniors for any issues relating it and that might lead to un-neccessary time waste thats why it is highly preferred to not use any other IDEs). You are encouraged to use sublime or VSCode.

Sublime:

Install Sublime3 (google or use this link) Here we will outline some basic configuration for sublime3 we usually use.

i- Settings Tweaks In sublime go to preferences->settings and place these in user settings tab along with other settings. Don't mess with default settings tab

@hasannadeem
hasannadeem / settings.json
Last active January 4, 2020 10:06
VSCode user settings and customizations.
{
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[slim]": {
"files.trimTrailingWhitespace": false
},