Skip to content

Instantly share code, notes, and snippets.

View qoomon's full-sized avatar
🌳
Go for it.

Bengt Brodersen qoomon

🌳
Go for it.
View GitHub Profile
@qoomon
qoomon / default.conf
Last active January 6, 2016 16:29
nginx subdomain to port config HTTP
# replace <ServiceSubDomain>
# replace <LocalPort>
server {
listen 80;
server_name <ServiceSubDomain>.*;
access_log off;
# Increase this to JIRA's maximum attachment size (10M by default)
client_max_body_size 10M;
@qoomon
qoomon / default.conf
Last active January 6, 2016 16:31
nginx subdomain to port config HTTPS
# replace <ServiceSubDomain>
# replace <LocalPort>
# replace <SslFileName>
server {
listen 443 ssl;
server_name <ServiceSubDomain>.*;
access_log off;
ssl_certificate /etc/ssl/certs/<SslFileName>.pem;
@qoomon
qoomon / remove_logs.cron
Last active March 22, 2017 14:07
Crontab Job to remove old logging files
* * * * * find /var/log/process -type f -name '*.log.*' -mtime +7 -delete
@qoomon
qoomon / gource.sh
Last active November 17, 2023 13:01
beautiful gource configuration
gource \
--highlight-dirs \
--file-idle-time 0 \
--filename-time 8 \
--filename-colour 999999 \
--file-font-size 18 \
--dir-colour 999999 \
--dir-font-size 24 \
--key \
--user-font-size 24 \
@qoomon
qoomon / Git update hook
Last active July 18, 2017 15:19
Git update hook
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
@qoomon
qoomon / keybase.md
Created August 12, 2016 10:37
Keybase proof

Keybase proof

I hereby claim:

  • I am qoomon on github.
  • I am qoomon (https://keybase.io/qoomon) on keybase.
  • I have a public key ASAZKCVD102Exu5sgIndvAuISX-y-3q9ouKfMUu0F-xK7Ao

To claim this, I am signing this object:

@qoomon
qoomon / docker-registry-clean.sh
Last active November 21, 2019 20:04 — forked from bjaglin/remove-orphan-images.sh
DEPRECATED in favour of `docker image prune` https://docs.docker.com/config/pruning/
#!/bin/sh
base_dir=/var/lib/registry/docker/registry/v2
repository_dir=$base_dir/repositories
image_dir=$base_dir/blobs
output_dir=$(mktemp -d)
all_images=$output_dir/all
used_images=$output_dir/used
@qoomon
qoomon / deploy_to_git.sh
Last active September 12, 2017 09:11
Deploy to Git
#!/bin/sh
set -e
if [ $# -ne 3 ]; then
echo "Usage: ... <SOURCE_FOLDER> <TARGET_REPO> <TARGET_BRANCH>"
exit 1;
fi
SOURCE_FOLDER="$1"
@qoomon
qoomon / git-clone-into-non-empty-directory.sh
Last active March 22, 2017 13:58 — forked from damondouglas/gitclone-nonempty.sh
Git clone into non-empty directory
#!/bin/sh
REPO_URL="$1"
TARGET_DIR="${2:-$(basename $REPO_URL .git)}"
SHADOW_DIR='.git.shadow'
cd $TARGET_DIR
git clone --no-checkout $REPO_URL $SHADOW_DIR
mv $SHADOW_DIR/.git .
rm -rf $SHADOW_DIR
@qoomon
qoomon / brew_install_version.sh
Last active August 1, 2018 22:29
Homebrew - install specific formula version
https://github.com/Homebrew/homebrew-core/raw/0ae3bc02d2962a39ccec65052fcffa82becc5bb6/Formula/abcl.rb
BREW_GITHUB_REPO='https://github.com/Homebrew/homebrew-core'
FORMULA_NAME="${1}"
# find formula version and coresponding commit hash at http://braumeister.org
FORMULA_COMMIT="${2}"
brew install '${BREW_GITHUB_REPO}/raw/${FORMULA_COMMIT}/Formula/${FORMULA_NAME}.rb' && brew pin '${FORMULA_NAME}'