Skip to content

Instantly share code, notes, and snippets.

Nicolas Bettenburg nicbet

Block or report user

Report or block nicbet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nicbet / Code Signing with Git on Mac OS
Created Dec 13, 2019
Code Signing in Git on Mac OS X
View Code Signing with Git on Mac OS

Install required software

brew install gpg pinentry pinentry-mac

Create a GPG Key

gpg --full-generate-key
View Deploy a Phoenix app with
nicbet /
Created Jul 8, 2019
Digital Ocean - Dynamic DNS (DDNS) Updater Script for Multiple Subdomains (e.g., Traefik)
# Created by // Loranth Moroz // v.0.5
# Updated by yukicreative // Jay Vogt // v.0.6
# Updated by nicbet // Nicolas Bettenburg // v.0.7
# Required tools to run this script as is: curl ( & jq (
# This is to be used with crontab -> example entry to run it every 3hours:
# 0 */3 * * * sh /path/to/script/
# Don't forget to make it executable: chmod +x /path/to/script/
nicbet / Dockerfile
Created Jun 27, 2019
Elixir 1.9 Releases Alpine Linux Docker Multi-Stage Build
View Dockerfile
# ---- Build Stage ----
FROM erlang:22-alpine AS app_builder
# Set environment variables for building the application
ENV MIX_ENV=prod \
TEST=1 \
# Fetch the latest version of Elixir (once the 1.9 docker image is available you won't have to do this)
RUN set -xe \
nicbet / workbench.main.css
Created May 7, 2019
Visual Studio Code Tree Lines
View workbench.main.css
* Copyright (C) Microsoft Corporation. All rights reserved.
* /Applications/Visual\ Studio\
.monaco-action-bar{text-align:right;overflow:hidden;white-space:nowrap}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;width:100%;justify-content:flex-end}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar.reverse .actions-container{flex-direction:row-reverse}.monaco-action-bar .action-item{cursor:pointer;display:inline-block;transition:transform 50ms ease;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar.animated{transform:scale(1.272019649)}.monaco-action-bar .action-item .icon{display:inline-block}.monaco-action-bar .action-label{font-size:11px;margin-right:4px}.monaco-action-bar .action-label.octicon{fo
nicbet / song.txt
Created May 6, 2019
Teaching my Toddler about Bitbucket
View song.txt
The itsy bitsy bucket contains all our code,
down comes the git commit and adds another load,
out comes the pull request and merges the changes in,
the itsy bitsy bucket now has more code within.
nicbet /
Created Apr 30, 2019
Prettier formatting of numbers for Tables in Python
def pretty_num(value, t=5):
if(len(repr(value)) > t):
if(value < 1):
return 0
return '%.2e' % value
return "{:,}".format(value)
nicbet /
Created Apr 9, 2019
Running Data Services via Docker with Persistent Data
docker run --name mysql -d -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_ROOT_PASSWORD=mysql -v $(pwd)/mysql:/var/lib/mysql -p 3306:3306 mysql:8
nicbet / .rubocop.yml
Created Apr 3, 2019
Rubocop sane defaults for Rails 5.2
View .rubocop.yml
Enabled: true
TargetRubyVersion: 2.5
- bin/*
- Gemfile
- vendor/**/*
- node_modules/**/*
- db/schema.rb
nicbet / database.yml
Created Apr 3, 2019
DRY Database Config for Rails
View database.yml
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: <%= ENV.fetch("DB_USER") { "postgres" } %>
password: <%= ENV.fetch("DB_PASSWORD") { "postgres" } %>
host: <%= ENV.fetch("DB_HOST") { "localhost" } %>
You can’t perform that action at this time.