Skip to content

Instantly share code, notes, and snippets.

@bviktor
bviktor / gist:c351e89814b394a86a6f
Created April 24, 2015 08:44
Redmine 3 upgrade
export OLD_REDMINE=2.6.2
export NEW_REDMINE=3.0.1
systemctl stop nginx.service
wget http://www.redmine.org/releases/redmine-${NEW_REDMINE}.tar.gz
tar xf redmine-${NEW_REDMINE}.tar.gz -C /opt
cd /opt
rm redmine
ln -s redmine-${NEW_REDMINE} redmine
\cp -f redmine-${OLD_REDMINE}/config/configuration.yml redmine/config
\cp -f redmine-${OLD_REDMINE}/config/database.yml redmine/config
@bviktor
bviktor / le-renew.sh
Last active January 25, 2016 12:56
Let's Encrypt renew script
#!/bin/sh
# make sure the script can find the domain list even when invoked from a different dir
DIR=$(dirname $0)
# store your domain renewal commands here, one line per certificate, e.g.:
# -d foo.bar -d www.foo.bar
# -d foo2.foo.bar
DOMLIST="${DIR}/le-domains.txt"
@bviktor
bviktor / glavatar.sh
Last active June 28, 2018 10:18
GitLab Avatar Updater
#!/bin/sh
set -Eeu
########################################################################
############################ START SETTINGS ############################
########################################################################
# your GitLab instance' URL
export GITLAB_URL='https://gitlab.foobar.com'
#MACROS
nicext = "xl0"
nicint = "rl0"
tcpext = "{ 2121 2222 8080 }"
protovia = "{ tcp udp icmp }"
trusted = "{ 192.168.0.3 192.168.0.11, 192.168.0.12, 192.168.0.13 192.168.0.21 }"
shit = "{ 195.56.111.221 }"
#OPTIONS
set block-policy return
@bviktor
bviktor / 1804-test-root.log
Created December 3, 2019 17:43
Clevis 9a41f41 test results on Ubuntu 18.04 and 19.10 as user and root
ninja: Entering directory `build'
[0/1] Running all tests.
1/10 bind-wrong-pass-luks1 OK 5.64 s
2/10 bind-luks1 FAIL 10.88 s
3/10 unbind-unbound-slot-luks1 OK 3.23 s
4/10 unbind-luks1 FAIL 10.53 s
5/10 bind-key-file-non-interactive FAIL 10.96 s
6/10 bind-pass-with-newline FAIL 11.35 s
7/10 bind-pass-with-newline-keyfile FAIL 8.97 s
8/10 pin-sss OK 1.61 s
@bviktor
bviktor / imdb-close-gallery.js
Created March 22, 2022 21:31
Close IMDb image galleries by pressing the Escape button