Skip to content

Instantly share code, notes, and snippets.

View B-Stefan's full-sized avatar

Stefan Bieliauskas B-Stefan

View GitHub Profile
@B-Stefan
B-Stefan / docker-registry-clean.sh
Created August 17, 2018 14:53 — forked from qoomon/docker-registry-clean.sh
Docker Registry v2 / Remove orphan layers left by the "file" storage backend of the docker registry, heavily inspired by https://gist.github.com/shepmaster/53939af82a51e3aa0cd6
#!/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

LOAD CSV into Neo4j quickly and successfully

Since version 2.1 Neo4j provides out-of-the box support for CSV ingestion. The LOAD CSV command that was added to the Cypher Query language is a versatile and powerful ETL tool. It allows you to ingest CSV data from any URL into a friendly parameter stream for your simple or complex graph update operation, that …​ conversion.

@B-Stefan
B-Stefan / gist:581a065d5f15bc44da56
Created November 28, 2015 14:20 — forked from wimleers/gist:702387
How to convert from a custom date format into a UTC string using Qt.
QDateTime timeConvertor;
QString customDateString = "14-Nov-2010 05:27:03 +0100";
QString dateTime = customDateString.left(20).trim();
int timezoneOffset = customDateString.right(5).left(3).toInt();
timeConvertor = QDateTime::fromString(dateTime, "dd-MMM-yyyy HH:mm:ss");
// Mark this QDateTime as one with a certain offset from UTC, and set that
// offset.
timeConvertor.setTimeSpec(Qt::OffsetFromUTC);