Skip to content

Instantly share code, notes, and snippets.

View rmartinus's full-sized avatar
🎯
Focusing

Robbie Martinus rmartinus

🎯
Focusing
  • Sydney, Australia
View GitHub Profile
@rmartinus
rmartinus / golang-stuff.txt
Created September 12, 2019 00:33
Golang stuff
mkdir -p ~/dev/go/src
sudo chown -R $(whoami) /usr/local/bin
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
echo "machine gitlab.com login ${GITLAB_USER} password ${GITLAB_TOKEN}" > ${HOME}/.netrc
@rmartinus
rmartinus / golang-guide-for-java-engineers.txt
Last active June 16, 2019 23:16
Golang guide for Java Engineers
# Short variable names
The most
# Public / private functions
Public funcs start with a capital letter
Private funcs start with a lower case letter
# Closures
You can freely pass func
@rmartinus
rmartinus / docker-mysql
Created January 20, 2019 06:21
docker mysql
Run mysql as a daemon with docker volume
$ docker container run -d --name mysql -e MYSQL_DATABASE=<db_name> -e MYSQL_ROOT_PASSWORD=<db_password> -p 3306:3306 -v <volume_folder>:/var/lib/mysql mysql:5.7
@rmartinus
rmartinus / git squash
Last active January 2, 2019 07:32
git squash
Squash the last 12 commits
$ git reset --hard HEAD~12
$ git merge --squash HEAD@{1}
$ git commit
$ git push -f
@rmartinus
rmartinus / git sync a fork
Last active December 19, 2018 00:16
git sync a fork
$ git remote -v
origin https://github.com/rmartinus/YOUR_FORK.git (fetch)
origin https://github.com/rmartinus/YOUR_FORK.git (push)
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
$ git remote -v
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
@rmartinus
rmartinus / mvnw
Created October 13, 2018 00:23
Create mvn wrapper
$ mvn -N io.takari:maven:wrapper
$ mvn -N io.takari:maven:wrapper -Dmaven=3.5.4
@rmartinus
rmartinus / .gitconfig
Last active September 19, 2018 05:25
gitconfig (MacOS)
[core]
excludesfile = ~/.gitignore_global
autocrlf = input
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[user]
@rmartinus
rmartinus / .bash_profile
Last active January 12, 2023 23:31
bash profile (MacOS)
#!/usr/bin/env bash
####################################################
# env variables
####################################################
export PYTHON_HOME=~/Library/Python/3.7
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
export M2_HOME=/usr/local/Cellar/maven/3.6.0/libexec
export GRADLE_HOME=/usr/local/Cellar/gradle/5.4.1/libexec
export GOROOT=/usr/local/go

Keybase proof

I hereby claim:

  • I am rmartinus on github.
  • I am rmartinus (https://keybase.io/rmartinus) on keybase.
  • I have a public key ASBkNiUQa1PDBwMnCBs58PcWkwznsyWbxBkjXDlCxtLNuwo

To claim this, I am signing this object: