Skip to content

Instantly share code, notes, and snippets.

View arosini's full-sized avatar

Adam Rosini arosini

View GitHub Profile
@arosini
arosini / genesis_public_key
Last active March 3, 2018 19:33
Genesis Public Key
04c7104fca91e180b79861022daac7fef2e342f2cd3e0c024a2a10dd5204e49f9dd9c93a5e78d5a2d2bcacef557fa55417372aa6c79f70e168d7d2bd0b2ae1f49bnortss
@arosini
arosini / startup.bat
Last active April 11, 2016 13:09
Startup script for Windows
:: Start Eclipse
:: start "" "C:\Program Files (x86)\Eclipse\eclipse.exe"
:: Start Chrome
start "" "C:\Users\rosinia\AppData\Local\Google\Chrome\Application\chrome.exe" https://www.google.com
:: Start Outlook
start "" "C:\Program Files (x86)\Microsoft Office\Office15\OUTLOOK.exe"
:: Start Lync
@arosini
arosini / setup-linux.sh
Created March 28, 2016 17:33
Sets up a new Linux installation
#!/bin/bash
##################
# Initialization #
##################
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl
##########
@arosini
arosini / ModelTests.java
Last active January 19, 2021 23:10
JUnit test for 100% code coverage of Lombok's @DaTa annotation
import com.google.common.reflect.ClassPath;
import javassist.CannotCompileException;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtConstructor;
import javassist.CtMethod;
import javassist.CtNewConstructor;
import javassist.CtNewMethod;
import javassist.NotFoundException;
import nl.jqno.equalsverifier.EqualsVerifier;
@arosini
arosini / startup.sh
Last active April 15, 2016 19:16
Linux startup script
#!/bin/bash
########################################## SETUP ###########################################
# Install xdotool
if [ $(dpkg-query -W -f='${Status}' xdotool 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
sudo apt-get install xdotool;
fi
# Make sure 'eval "$BASH_POST_RC"' is at the end of the .bashrc
@arosini
arosini / update-git-repos.sh
Last active March 28, 2016 17:35
Script to update Git repositories
#!/bin/bash
# The update_git_repo function updates a local copy of a git repository by fetching/pruning all branches,
# changing to the develop branch, pulling from the remote develop branch and then switching back to the
# original working branch. The first and only argument is the directory of the path to the git repository.
update_git_repo()
{
if [ -d "$1" ]; then
cd $1
export REPO_NAME=$(basename `git rev-parse --show-toplevel`)
@arosini
arosini / .bashrc
Last active March 28, 2016 17:29
My most recent .bashrc setup
source ~/.git-prompt.sh
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;35m\] \w\[\033[01;34m\]$(__git_ps1) \[\033[01;36m\]\$\[\033[00m\] '
source $HOME/autocomplete_scripts/kubectl.sh
export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"
export PATH=$JAVA_HOME/bin:$PATH
export NVM_DIR="/home/adam/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm