Skip to content

Instantly share code, notes, and snippets.

View poikilotherm's full-sized avatar
🏠
Working from home

Oliver Bertuch poikilotherm

🏠
Working from home
View GitHub Profile
@poikilotherm
poikilotherm / update-ipv6.sh
Created December 15, 2020 22:19
Update DynV6.net DynDNS via Bash Script
#!/bin/bash
set -euo pipefail
IP4=$(curl -sS -f https://api.ipify.org)
IP4_DNS=$(dig +short myhostname.dynv6.net A @dynv6.com)
IP6=$(curl -sS -f https://api64.ipify.org)
IP6_DNS=$(dig +short myhostname.dynv6.net AAAA @dynv6.com)
@poikilotherm
poikilotherm / auth-providers.json
Created February 26, 2020 15:31
Dataverse Auth Provider JSON Schema - Draft v0.1
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"_comment_$id": "https://dataverse.org/auth-providers.json",
"title": "Dataverse Authentication Providers",
"type": "object",
"required": [
"id",
"type",
"enabled",
@poikilotherm
poikilotherm / test.tsv
Last active January 15, 2020 14:34
Custom Metadata Test File
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 11 columns, instead of 10. in line 1.
#metadataBlock name dataverseAlias displayName blockURI
fzj FZJ Metadata https://dataverse.org/schema/citation/
#datasetField name title description watermark fieldType displayOrder displayFormatadvancedSearchField allowControlledVocabulary allowmultiples facetable displayoncreate required parent metadatablock_id termURI
institute Institute The institute. text 0 : TRUE TRUE TRUE TRUE TRUE TRUE fzj
#controlledVocabulary DatasetField Value identifier displayOrder
institute Test test 0
@poikilotherm
poikilotherm / encrypt-pdf.sh
Last active August 18, 2019 16:33
Encrypt all PDF files using qPDF. Disallow ALL options, don't ask for a password to open and use unknown random password from pwgen for owner.
for I in *.pdf
do
qpdf --encrypt '' `pwgen -sny1 32` 256 --accessibility=n --extract=n --print=low --assemble=n --annotate=n --form=n --modify-other=n --modify=none -- "$I" "`basename $I .pdf`.enc.pdf"
done
@poikilotherm
poikilotherm / minikube-none-driver.txt
Last active May 29, 2019 15:21
Running Minikube with "none" VM driver - based on CentOS
# Based on https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md
# See also: https://github.com/LiliC/travis-minikube/blob/master/.travis.yml
sudo yum update -y
sudo yum install -y epel-release
sudo yum install -y htop
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
@poikilotherm
poikilotherm / scrub-all.sh
Last active April 14, 2017 20:37 — forked from morph027/scrub-all.sh
scrub all zfs on linux pools sequentially (with option to exclude pools)
#!/bin/bash
##
## --exclude takes one pool or a comma seperated list of pools
##
## Example: scrub-all.sh --exclude rpool
## Example: scrub-all.sh --exclude rpool,tank-foo,tank-bar
##
EMAIL_RECIPIENT="foo@bar.com"
@poikilotherm
poikilotherm / SQlite DB Dump
Created November 18, 2014 08:40
Just a test data set
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
INSERT INTO "users" VALUES(1,'admin','$2y$10$azqlLpQDRv1MOQclyhgVPeFL0Rj6O9YMiiWTXLZMAqYMsQttD3Ypq',1,0,0,NULL,NULL,NULL,NULL,0,NULL);
INSERT INTO "projects" VALUES(1,'Test',1,'',1416299176,0,0,0);
INSERT INTO "columns" VALUES(1,'Backlog',1,1,4);
INSERT INTO "columns" VALUES(2,'Ready',2,1,2);
INSERT INTO "columns" VALUES(3,'Work in progress',3,1,1);
INSERT INTO "columns" VALUES(4,'Done',4,1,0);
INSERT INTO "tasks" VALUES(1,'Test','test #1',1414066449,'yellow',1,1,0,1,1,NULL,0,0,0,1,1414155137,'',NULL,0,0);
INSERT INTO "tasks" VALUES(2,'Test1234','Test',1416299176,'yellow',1,1,0,2,1,NULL,0,0,0,1,1416299176,'',NULL,0,0);