Skip to content

Instantly share code, notes, and snippets.

View vraravam's full-sized avatar

Vijay Aravamudhan vraravam

  • ThoughtWorks Inc.
  • Chennai, India
  • X @avijayr1
View GitHub Profile
@vraravam
vraravam / gist:9f17383fd596e6e821199fdd8512ebc6
Created January 6, 2025 08:31
Template for configuring ssh
# file location: ${HOME}/.ssh/config
# Note: To generate new ssh key (replace placeholders with your values):
# ssh-keygen -t ed25519 -a 100 -b 4096 -f ${HOME}/.ssh/id_ed25519-tw -q -N '' -C "[email protected]"
# ssh-keygen -t rsa -a 100 -b 4096 -f ${HOME}/.ssh/id_rsa-YYYY -q -N '' -C "[email protected]"
# TODO: This can be removed if the 'pushInsteadOf' setting is removed from the dotfiles repo
Host github.com
IdentityFile ${HOME}/.ssh/id_rsa-avijayr
@vraravam
vraravam / History|-1023ea7b|entries.json
Last active January 8, 2025 04:20
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/vijay/dev/jd/ecomm/ui/brazil-ui/packages/client/Dockerfile.client.dev","entries":[{"id":"sG6Q.dev","source":"searchReplace.source","timestamp":1728044506562},{"id":"vOLy.dev","source":"searchReplace.source","timestamp":1728044646591},{"id":"auwS.dev","source":"searchReplace.source","timestamp":1728044670361}]}
@vraravam
vraravam / fresh-install-of-osx-vijay.sh
Last active July 9, 2024 14:18
This is a secondary script to be run after the common one. This is specific to my setup. Its been shared with the intent of other folks to be inspired from the same - if they choose to use it.
This script has been moved here: https://github.com/vraravam/dotfiles
@vraravam
vraravam / .gitconfig-template.inc
Last active December 18, 2024 11:08
~/.gitconfig-template.inc
# file location: ${HOME}/.gitconfig-template.inc
[user]
name = <your-name>
email = <your-email>
# For more advanced usage using seamless url-rewriting (which mandates configuring ~/.ssh/config correctly), please see https://medium.com/@biradarav.100/manage-multiple-git-github-gitlab-accounts-efficiently-on-a-single-machine-2ecde70f522f
# [url "git@github-personal:"]
# insteadOf = [email protected]:
# insteadOf = https://github.com/
@vraravam
vraravam / keybase.md
Created August 6, 2018 15:29
Keybase proof - do not delete

Keybase proof

I hereby claim:

  • I am vraravam on github.
  • I am avijayr (https://keybase.io/avijayr) on keybase.
  • I have a public key ASDVxohOsQDJzlP6IefK0ywr2A209DReuTPISjz7vYBmOAo

To claim this, I am signing this object:

@vraravam
vraravam / fresh-install-of-osx.sh
Last active July 9, 2024 14:19
Steps to get "up and running" with new Mac OSX
This script has been moved here: https://github.com/vraravam/dotfiles
@vraravam
vraravam / paranoia_helper.rb
Created February 21, 2017 15:35
Paranoia Helper for Parent-Child edit functionality
# frozen_string_literal: true
module ParanoiaHelper
extend ActiveSupport::Concern
module ClassMethods
private
# This method generates an instance method with the name: associated_sym.to_s.pluralize.
#
# Example:
@vraravam
vraravam / application.rb
Created March 5, 2016 03:46
Rails generator configuration using rspec and factory_girl
# config/application.rb
class Application < Rails::Application
config.generators do |g|
g.orm :active_record
g.template_engine :erb
g.stylesheets false
g.javascripts false
g.test_framework :rspec,
fixtures: true,
view_specs: false,
@vraravam
vraravam / gist:bd1373abeaee41b422ed
Created February 22, 2016 04:48
Git commands to remove specific files from history
To find the blobs taking up the max space:
git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -100 | awk '{print$1}')"
To delete blobs from history:
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch node_modules/* plugins/* platforms/* resources/ios/* resources/android/*' --tag-name-filter cat -- --all
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch public/assets/*' --tag-name-filter cat -- --all
@vraravam
vraravam / database_cleaner.rb
Created January 13, 2016 05:41
If using database_cleaner gem in a rails app....
# spec/support/database_cleaner.rb
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each, js: true) do
DatabaseCleaner.strategy = :truncation
end