Skip to content

Instantly share code, notes, and snippets.

View abh1nav's full-sized avatar

Abhinav Ajgaonkar abh1nav

View GitHub Profile
@abh1nav
abh1nav / refresh.js
Created December 19, 2016 17:22
Salesforce Dashboard Auto-Refresh
// ==UserScript==
// @name Refresh Salesforce Dashboard
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Sales target dashboard refresher
// @author Abhinav Ajgaonkar
// @match https://na22.lightning.force.com/desktopDashboards/dashboardApp.app*
// @grant none
// @require https://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
@abh1nav
abh1nav / install-codedeploy-agent.sh
Created October 18, 2016 19:54
Because AWS CodeDeploy agent installer doesn't work on 16.04 LTS and AWS can't be bothered to fix it
#!/bin/bash
apt-get -y install ruby python-pip wget equivs gdebi-core
cd /tmp
cat > ruby2.0 <<EOF
Section: misc
Priority: optional
Standards-Version: 3.9.2
Package: ruby2.0-dummy
Provides: ruby2.0
package main
import (
"fmt"
"log"
"github.com/boltdb/bolt"
)
var bucketName = []byte("bucket")
@abh1nav
abh1nav / docker-cassandra.sh
Last active August 29, 2015 14:06
Start a 5 node Cassandra cluster with OpsCenter using Docker
#!/bin/bash
docker pull abh1nav/opscenter:latest
docker pull abh1nav/cassandra:latest
echo "Starting OpsCenter"
docker run -d --name opscenter abh1nav/opscenter:latest
sleep 10
OPS_IP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' opscenter)
echo "Starting node cass1"
docker run -d --name cass1 -e OPS_IP=$OPS_IP abh1nav/cassandra:latest
sleep 30
@abh1nav
abh1nav / zip.scala
Created August 29, 2014 04:15
Zip with Index
// Trying to debug an actor system where workers are spawned from a list of work objects
// and only some workers exit cleanly while others crash
case class Work(...)
val workload = List[Work](...)
workload.zipWithIndex.foreach({
case (work, index) =>
val worker = context.actorOf(Props[WorkActor], s"worker$index")
@abh1nav
abh1nav / redis.conf
Created December 14, 2013 05:42
Redis conf
daemonize no
pidfile /var/run/redis.pid
port 6379
timeout 0
tcp-keepalive 0
loglevel notice
logfile stdout
databases 8
save 300 1
save 60 10
@abh1nav
abh1nav / setup.sh
Last active December 29, 2015 21:19
Setup script for DVTO4
#!/bin/sh
#
# Base dependencies
sudo apt-get update -y
sudo apt-get install -y curl postgresql libpq-dev postgresql-server-dev-all build-essential
# Setup .gemrc to skip rdoc and ri installation
echo "install: --no-rdoc --no-ri" >> $HOME/.gemrc
echo "update: --no-rdoc --no-ri" >> $HOME/.gemrc
@abh1nav
abh1nav / keybindings.tmux
Created November 8, 2013 22:08
Byobu keybindings
# Shamelessly stolen from https://github.com/chrisjaure/dotfiles/blob/master/.byobu/keybindings.tmux
unbind-key -n C-a
set -g prefix ^A
bind a send-prefix
# new split on top (alt+up), left (alt+left), right (alt+right), bottom (alt+down)
bind-key -n M-Up split-window -v \; swap-pane -s :. -t :.- \; select-pane -t :.-
bind-key -n M-Left split-window -h \; swap-pane -s :. -t :.- \; select-pane -t :.-
bind-key -n M-Right split-window -h
bind-key -n M-Down split-window -v
@abh1nav
abh1nav / README.md
Created October 13, 2013 21:11 — forked from nikcub/README.md
@abh1nav
abh1nav / .conkyrc
Created May 11, 2013 05:20
.conkyrc
background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager