Skip to content

Instantly share code, notes, and snippets.

@vshank77
vshank77 / pyinstall.sh
Created September 22, 2019 20:33
Parallel Python Install
#/bin/bash
brew unlink python
brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
brew switch python 3.6.5_1
brew switch python 3.7.4
@vshank77
vshank77 / settings.xml
Created February 21, 2018 03:10
Maven Settings
<?xml version="1.0" encoding="UTF-8" ?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>jfrog-repository</id>
<username>sanjeet</username>
<password>${your-pwd}</password>
</server>
</servers>
@vshank77
vshank77 / .zshrc
Last active April 11, 2024 13:45
ZSH Settings
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="shanks"
CASE_SENSITIVE="true"
DISABLE_UPDATE_PROMPT="true"
export UPDATE_ZSH_DAYS=13
COMPLETION_WAITING_DOTS="true"
HIST_STAMPS="dd/mm/yyyy"
@vshank77
vshank77 / ant.xml
Last active February 9, 2018 00:04
es-integration-ant
<?xml version="1.0" encoding="UTF-8"?>
<project name="integration-tests" xmlns:if="ant:if" xmlns:unless="ant:unless">
<!-- our pid file for easy cleanup -->
<property name="integ.pidfile" location="${project.build.directory}/integration-tests/run/es.pid"/>
<!-- if this exists, ES is running (maybe) -->
<available property="integ.pidfile.exists" file="${integ.pidfile}"/>
<!-- name of our cluster, maybe needs changing -->
<property name="integ.http.port" value="9200"/>
@vshank77
vshank77 / cficlassification.json
Last active November 20, 2017 19:40
CFI Classifications
{
"ES": {
"cat": "Equity",
"group": "Common / Ordinary shares",
"attr1": {
"V": "Voting",
"N": "Non-Voting",
"R": "Restricted",
"E": "Enhanced voting"
},

Keybase proof

I hereby claim:

  • I am vshank77 on github.
  • I am vshank77 (https://keybase.io/vshank77) on keybase.
  • I have a public key ASBPICXY-ZTbBLtgzBvSDUYhVstisYSzJfSaKdAbb6J1Xwo

To claim this, I am signing this object:

@vshank77
vshank77 / CfiCodeGen.java
Created May 2, 2017 22:50
Generating CFI Codes
package io.abaci.dataserver.handlers.object;
import com.google.common.collect.ImmutableMap;
import lombok.RequiredArgsConstructor;
import org.testng.annotations.Test;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;
@vshank77
vshank77 / Cors-on-nginx.sh
Created January 5, 2017 16:18
Enable CORS on Nginx
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
add_header 'Access-Control-Allow-Origin' '*';
@vshank77
vshank77 / docker_aliases.sh
Last active April 29, 2019 09:01
Docker clean up commands
alias dockstart='docker-machine start default'
alias dockrestart='docker-machine restart default'
alias dockstop='docker-machine stop default'
alias dock='eval "$(docker-machine env default)"'
alias dockswm='eval "$(docker-machine env -swarm swarm-master)"'
alias dps='docker ps -a'
alias dqf='docker images -qf "dangling=true"'
alias ddqf='docker rmi -f $(docker images -qf "dangling=true")'
alias ddrmi='docker rmi -f $(docker images | grep -e "latest" -e "SNAPSHOT" | awk '"'"'{print $3}'"'"')'
alias dimg='docker images'
@vshank77
vshank77 / LicenseReader.java
Created October 26, 2015 18:26
Importing Maven License into Excel
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.Sets;
import com.google.common.io.Resources;
import org.testng.annotations.Test;
import java.util.List;
import java.util.Objects;
import java.util.TreeSet;
import static com.google.common.base.Charsets.UTF_8;