Skip to content

Instantly share code, notes, and snippets.

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@unusedPhD
unusedPhD / gist:d3b1cd9ef954b60ac4f62a0d2a91a051
Created November 16, 2018 14:24
pyenv compiling new version with macos mojave
CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib" \
PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2 \
pyenv install -v 3.6.0
@unusedPhD
unusedPhD / ecr-docker-login
Created November 23, 2017 12:38
Use cgswong/aws docker image to login to aws ecr. Useful when awscli is not installed.
eval $(docker run --rm \
-e AWS_ACCESS_KEY_ID=$aws_access_key_id\
-e AWS_SECRET_ACCESS_KEY=$aws_secret_access_key \
-e AWS_DEFAULT_REGION=ca-central-1 \
cgswong/aws aws ecr --no-include-email get-login)
@unusedPhD
unusedPhD / sign-and-upload.sh
Created May 2, 2017 13:11 — forked from taylanpince/sign-and-upload.sh
Travis CI: Check for tag, generate release notes, sign binary and upload to Tryouts for release distribution
#!/bin/sh
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "This is a pull request. No deployment will be done."
exit 0
fi
if [[ "$TRAVIS_BRANCH" != "master" ]]; then
echo "Testing on a branch other than master. No deployment will be done."
exit 0
fi
@unusedPhD
unusedPhD / docker-compose-coreos.sh
Created February 3, 2017 13:59 — forked from sourcec0de/docker-compose-coreos.sh
Install docker compose on coreos
sudo su -
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@unusedPhD
unusedPhD / keybase.md
Created September 23, 2016 18:10
keybase proof of identity

Keybase proof

I hereby claim:

  • I am unusedPhD on github.
  • I am unusedphd (https://keybase.io/unusedphd) on keybase.
  • I have a public key whose fingerprint is BD65 E085 90CA ECD8 92DC 7663 19D6 BD45 E088 EFA2

To claim this, I am signing this object:

@unusedPhD
unusedPhD / init_cassandra
Created November 11, 2015 01:49
init.d file for cassandra with ulimit -n call to increase limit
#!/bin/bash
CASSANDRA=/opt/cassandra/bin/cassandra
PIDFILE=/var/run/cassandra.pid
LOGFILE=/var/log/cassandra/init.log
PARAMS="-p ${PIDFILE}"
writelog() {
echo "`date` : $1" >> "$LOG"
}
@unusedPhD
unusedPhD / nginx.conf
Created November 1, 2015 11:02 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@unusedPhD
unusedPhD / README.pod
Last active September 16, 2015 11:41
Basic example on how to use redis for job queueing in Perl

Redis jobqueue client

Redis has a feature called lists. The lists can be treated as a stack where elements can be pushed onto or popped from. There are several calls which help you to manage such lists. Once nice feature is the blpop command which does a blocking call on the queue. Therefore it's a nice and elegant way to implement a queue systems for tasks.