Skip to content

Instantly share code, notes, and snippets.

View nikhgupta's full-sized avatar
🏠
Working from home

Nikhil Gupta nikhgupta

🏠
Working from home
View GitHub Profile
@nikhgupta
nikhgupta / .rubocop.yml
Last active April 6, 2021 10:09
rubocop v0.71.0 - sane config and automation
require:
- ./spec/linters/migrations/migration_linting.rb
- rubocop-rails
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.4
UseCache: true
CacheRootDirectory: ./.rubocop-cache
Exclude:
@nikhgupta
nikhgupta / application_presenter.rb
Last active March 14, 2023 21:17
Rails PORO Decorator - Supports ActiveAdmin
class ApplicationPresenter
attr_reader :model
delegate_missing_to :@model
delegate :helpers, to: 'ActionController::Base'
delegate :url_helpers, to: 'Rails.application.routes'
delegate :to_param, :to_json, :to_query, :to_yaml, :to_enum, to: :@model
delegate :model_name, :model_name_const, :model_name_underscore, to: :class
def initialize(model)
@nikhgupta
nikhgupta / settings.json
Created June 23, 2020 14:48
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
// You can add more global application settings here.
This file has been truncated, but you can view the full file.
0-00.usa.cc
0-180.com
0-30-24.com
0-420.com
0-900.com
0-aa.com
0-attorney.com
0-mail.com
0-z.xyz
00.msk.ru
0815.ru
0815.su
0clickemail.com
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
10minutemail.de
123-m.com
1chuan.com
0-mail.com
0sg.net
11mail.com
123.com
123india.com
123mail.cl
123mail.org
126.com
139.com
150mail.com
@nikhgupta
nikhgupta / gist:3b6e9de8b338b41bdf70b36dca5aeb73
Last active November 28, 2023 01:43
List of Disposable email domains
# `curl https://raw.githubusercontent.com/ivolo/disposable-email-domains/master/index.json -s | jq -r '.[]' | gist`
0-180.com
0-30-24.com
0-420.com
0-900.com
0-aa.com
0-mail.com
0-z.xyz
00.pe
000476.com
@nikhgupta
nikhgupta / gist:3f60fc55db86b4fddccaa6a301ee03a7
Last active March 26, 2020 13:13
List of Disposable Wildcard Domains
# `curl https://raw.githubusercontent.com/ivolo/disposable-email-domains/master/wildcard.json -s | jq -r '.[]' | gist`
0x01.gq
0x01.tk
10mail.org
33m.co
33mail.com
3utilities.com
acusupply.com
adultvidlite.com
aji.kr
@nikhgupta
nikhgupta / problem-1a.rb
Last active December 5, 2019 05:32
Math Problem Generator - Sample
#!/usr/bin/env ruby
#
# Problem Statement
# =================
# 1a) Two fractions with different denominators (Minuend and Subtrahend). Choose
# from the following pairs of denominators: 2 and 3, 2 and 4, 2 and 5, 3 and 6,
# 3 and 9, 4 and 8, 5 and 10, 6 and 12. Difference is greater than 0. (i.e.
# 1/2-2/5)
# =================
@nikhgupta
nikhgupta / upwork-to-zoho-csv.rb
Created November 14, 2018 08:06
Convert Upwork Transaction History to format suitable for Zoho Books
#!/usr/bin/env ruby
# Script to convert upwork transaction history to a CSV
# format that Zoho Books does accept.
require 'csv'
require 'pry'
require 'time'
path = ARGV.first