Skip to content

Instantly share code, notes, and snippets.

View abhchand's full-sized avatar
💭
sup

abhchand

💭
sup
View GitHub Profile
@abhchand
abhchand / Papercut-11783.md
Last active November 5, 2018 16:00
Approach for Papercut 11783

Goal

See Papercut #11783. Subsections should consistently have the indent arrow

expected

I'm trying to add that indent arrow to the "Users" nav section on the account settings page:

actual

@abhchand
abhchand / README.md
Last active October 10, 2018 18:54
SchemaSpy Installation & Execution

SchemaSpy

Install Java

brew cask install java

Download SchemaSpy (original)

wget https://github.com/schemaspy/schemaspy/releases/download/v6.0.0/schemaspy-6.0.0.jar
@abhchand
abhchand / patch.diff
Created June 25, 2018 20:28
GB-1509 Code Review Changes
diff --git a/app/assets/stylesheets/app/admin/users/imports/index.scss b/app/assets/stylesheets/app/admin/users/imports/index.scss
index 5c2fb2d..81a151e 100644
--- a/app/assets/stylesheets/app/admin/users/imports/index.scss
+++ b/app/assets/stylesheets/app/admin/users/imports/index.scss
@@ -27,8 +27,6 @@
}
.admin-users-imports-index__datatable-row {
- @extend .link_danger;
-
@abhchand
abhchand / active_record_benchmark.rb
Last active October 2, 2017 14:06
Blog Post: Speeding up ActiveRecord iterations on larger datasets
N = 1_000
Benchmark.bm do |x|
x.report("all columns") do
N.times do
User.find_by_sql("SELECT * FROM users LIMIT 1000;")
end
end
x.report("one column") do
@abhchand
abhchand / .bash_profile
Last active September 21, 2017 01:40
Blog Post: The interactor design pattern
function run_changed_specs {
arg=$1
branch=${arg:-master}
files=$(git diff $branch..HEAD --name-only | grep spec | grep -v spec_helper.rb)
echo "==="
echo "Running files changed since $branch:"
echo $files
echo ""
@abhchand
abhchand / users_controller.rb
Last active September 12, 2017 13:20
Blog Post: The interactor design pattern
class UsersController < ApplicationController
def create
# Validate the form data and return if it is not correct
# We'll come back and fill in the ???? with the call to the
# interactor shortly.
unless (????)
flash[:error] = ????
redirect_to(new_users_path)
return
end

Keybase proof

I hereby claim:

  • I am abhchand on github.
  • I am abhchand (https://keybase.io/abhchand) on keybase.
  • I have a public key whose fingerprint is 8D58 6BE3 7BDE 4F7D 158A DD52 6444 853E D34D 8636

To claim this, I am signing this object: