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 / resurrect-repositories.rb
Last active March 1, 2024 05:28
Script to resurrect git repositories
#!/usr/bin/env ruby
# file location: <anywhere>
# This script is useful to flag existing repositories that need to be backed up; and the reverse process ie resurrecting repo-configurations from backup
# It assumes the following:
# 1. The yaml config conforms to the structure as depicted down below
# 2. Ruby language is present in the system prior to this resurrection being done.
# To run it, just download the file, change it to become executable (`chmod +x resurrect-repositories.rb`) and then invoke by `./resurrect-repositories.rb`
@vraravam
vraravam / .aliases
Last active April 18, 2024 09:17
~/.aliases
#!/usr/bin/env zsh
# vim:syntax=zsh
# vim:filetype=zsh
# file location: ${HOME}/.aliases
# Add flags to existing aliases.
alias less="${aliases[less]:-less} -RF"
alias ls="${aliases[ls]:-ls} -G"
@vraravam
vraravam / .zshrc
Last active April 18, 2024 09:15
~/.zshrc - for use along with the "fresh_install_of_osx" file - to automtically configure omz plugins and settings.
#!/usr/bin/env zsh
# vim:syntax=zsh
# vim:filetype=zsh
# file location: ${HOME}/.zshrc
# Optimizing zsh: https://htr3n.github.io/2018/07/faster-zsh/
# for profiling zsh, see: https://unix.stackexchange.com/a/329719/27109
@vraravam
vraravam / osx-defaults.sh
Last active March 17, 2024 01:21
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# TODO: Need to figure out the settings for the following:
# 1) Dock: Items with order (not capturing binary data - since that is dependent on installed apps)
# 2) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 3) Login items for my user (i.e. apps started when I login)
# 4) Retina displays scaling
# 5) Finder sidebar with order
##
@vraravam
vraravam / Brewfile
Last active May 3, 2024 03:19
~/Brewfile
# file location: ${HOME}/Brewfile
# This file is used along with the `brew bundle` command to ensure that required packages and apps are installed.
# Also can be used to ensure that any package/apps that were installed as experimentation are uninstalled from the system.
# For a more detailed explanation of the philosophy/reasoning behind this file, please see https://openfolder.sh/macos-migrations-with-brewfile
# If you are starting such a file on a machine where you have already installed some apps using brew, then use `brew bundle dump` to create this file and avoid starting from scratch
# alias bcg='brew outdated --greedy' # List all casks that are outdated like a "dry-run" (and which have version marked as 'latest')
# alias bcug='brew upgrade --greedy' # Upgrades all casks that are outdated (and which have version marked as 'latest')
@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 / .vimrc
Last active April 18, 2024 09:10
Vim configuration
" file location: ${HOME}/.vimrc
set nocompatible " be iMproved, required
" filetype off " required
" mouse navigation
set mouse=a
set title
" highlighting
@vraravam
vraravam / fresh-install-of-osx.sh
Last active April 29, 2024 10:56
Steps to get "up and running" with new Mac OSX
#!/usr/bin/env zsh
# This script can be used to setup a macos machine based on Vijay's configurations. As of now, this script is idempotent and will restore your local setup to the same state if run multiple times.
# If you have the same files already present, it will prompt you whether to override or not
# file location: <anywhere> (just need to invoke it from that location)
# You can run this script using this command:
# curl -L https://gist.githubusercontent.com/vraravam/04fc2296b25090ea848642afbce4d168/raw -o fresh-install.sh; chmod +x ./fresh-install.sh; ./fresh-install.sh
# BEFORE STARTING TO RUN THIS SCRIPT (for the first time on a new machine)
@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 / brunch-config.js
Last active March 25, 2017 06:01
brunch-config.js for smpallen99\contact_demo
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: {
"js/app.js": /^(web\/static\/js)|(node_modules)/,
"js/ex_admin_common.js": /^(web\/static\/vendor)|(deps)/,
"js/admin_lte2.js": /^(web\/static\/vendor)|(deps)/,
"js/jquery.min.js": /^(web\/static\/vendor)|(deps)/,