Skip to content

Instantly share code, notes, and snippets.

View wildan3105's full-sized avatar
⌨️
Typing things remotely

Wildan S. Nahar wildan3105

⌨️
Typing things remotely
View GitHub Profile
@wildan3105
wildan3105 / prepare-commit-msg.sh
Created October 29, 2019 07:59 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@wildan3105
wildan3105 / introrx.md
Created August 24, 2018 06:44 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@wildan3105
wildan3105 / gist:29cf27a01c50a5c0cb6c9c7daf7f6c2b
Created April 11, 2018 03:06 — forked from tamoyal/gist:10441108
Create super user and database user in Mongo 2.6
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile