GitLab recently decided to silently delete any repositories that hadn't been accessed in the last year. The announcement didn't go over well and they soon caved to public pressure and decided to instead back up inactive repos to object storage instead of unilaterally deleting them. I'm glad they reconsidered, but the experience left me with a bad taste in my mouth, so I decided to look into (relatively) low
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery import | |
global.jQuery = require('jquery'); | |
var $ = global.jQuery; | |
window.$ = $; | |
// Bootstrap 4 depends on Popper.js | |
// Popper.js import | |
//import Popper from 'popper.js'; | |
//window.Popper = Popper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup mongodb from docker container | |
docker exec -i ${CONTAINER_NAME} mongodump --uri=${DB_URI} --archive --gzip > $(date +%Y%m%d_%H%M%S)_${DB_NAME}.pgsql.gz | |
# Restore mongodb from docker container | |
cat ${FILENAME}.mongodump.gz | docker exec -i ${CONTAINER_NAME} mongorestore --uri=${DB_URI} --nsFrom="${SRC_DB}.*" --nsTo="${DB}.*" --archive --gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup postgresql db from postgresql docker container | |
docker exec -i ${CONTAINER_NAME} pg_dump -U ${USERNAME} -w ${DB_NAME} -O -x | gzip -9 > $(date +%Y%m%d_%H%M%S)_${DB_NAME}.pgsql.gz | |
# Restore the postgresql db to postgresql docker container | |
gunzip -c ${FILENAME}.pgsql.gz | sudo docker exec -i ${CONTAINER_NAME} pg_restore -U ${USERNAME} -w -d ${DB_NAME} -C --clean -Fc -O -x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable systemd-networkd debugging | |
mkdir -p /etc/systemd/system/systemd-networkd.service.d/ | |
Create Drop-In /etc/systemd/system/systemd-networkd.service.d/10-debug.conf with following content: | |
[Service] | |
Environment=SYSTEMD_LOG_LEVEL=debug | |
And restart systemd-networkd service: | |
systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get update | |
sudo apt-get -y install build-essential cmake git pkg-config python-dev | |
sudo apt-get -y install libjpeg-dev libtiff5-dev libjpeg8-dev libjasper-dev libpng12-dev | |
sudo apt-get -y install libgtk2.0-dev | |
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev | |
sudo apt-get -y install libatlas-base-dev gfortran libxvidcore-dev libx264-dev | |
sudo pip install numpy | |
git clone https://github.com/opencv/opencv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 16.04 | |
sudo apt-get install libcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev | |
# Install php dev | |
sudo apt-get install php-dev | |
# for php5.6, sudo apt-get install php5.6-dev | |
# Install pecl | |
sudo apt-get install php-pear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
NewerOlder