Skip to content

Instantly share code, notes, and snippets.

View jmmaranan's full-sized avatar
🖥️
building something amazing

Jose Maranan jmmaranan

🖥️
building something amazing
View GitHub Profile
@jmmaranan
jmmaranan / .bashrc
Last active November 24, 2019 04:48
saving my .bashrc
##############################################
# terminal prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
##############################################
# SSH AGENT
SSH_ENV="$HOME/.ssh/environment"
@jmmaranan
jmmaranan / .gitconfig-windows
Last active December 4, 2017 21:51
my git config
[user]
name = JM Maranan
email = <email>
signingkey = <key>
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
@jmmaranan
jmmaranan / Commit Formatting.md
Created September 1, 2017 03:57 — forked from brianclements/Commit Formatting.md
Angular Commit Format Reference Sheet

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the AngularJS change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

yum -y install git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
cd ~
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
@jmmaranan
jmmaranan / go-build-win
Last active March 16, 2019 22:17
go build compress, strip debug, stacktraces
$ GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" cmd/app-name
$ upx --brute app-name.exe
from 5.7MB to 1.7MB!

Keybase proof

I hereby claim:

  • I am jmmaranan on github.
  • I am jmmaranan (https://keybase.io/jmmaranan) on keybase.
  • I have a public key ASATdWqq1Dvyfp0nErKHFDwb4xlrB-1PgIewsK2Dzmgd3Qo

To claim this, I am signing this object:

@jmmaranan
jmmaranan / quarkus-native.md
Last active December 25, 2019 23:17
Quarkus Native Build

Quarkus native-build needs:

  • a C development environment including zlib-dev.
  • graalvm_home with
gu install native-image
@jmmaranan
jmmaranan / nginx.conf
Created January 24, 2020 00:49
nginx conf for single-page apps
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@jmmaranan
jmmaranan / swagger.bat
Last active April 19, 2020 20:38
Windows docker run swagger
:: Credits from Go-Swagger itself: https://goswagger.io/install.html#for-windows-users
:: Same approach can be used for other Windows Host + Linux Containers,
:: which can completely replace some development setup command line tools.
::
:: `--rm` - eliminates the need for a lot of dangling containers each time the command script is run.
::
:: The `-v %CD%:<container path>` then `-w <that same container path>` makes the current directory
:: in the host universally accessible to the container.
::
:: `%*` - this accepts any param after the docker image