Skip to content

Instantly share code, notes, and snippets.

View juliushaertl's full-sized avatar
On vacation

Julius Härtl juliushaertl

On vacation
View GitHub Profile
for f in ~/repos/nextcloud/.github/workflow-templates/*.yml
filename=$(basename "$f")
if test -f "$target"; then
echo "$target exists, copy new content"
cp $f $target
juliushaertl /
Created June 15, 2023 14:37
Smalls script to get etags for debugging sync issues
echo "=> Parent etags"
dirnames() {
Index: lib/directeditor.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
--- lib/directeditor.php (revision c49b4a2fb8609b30d09fc5914753b64c23cab41b)
+++ lib/directeditor.php (date 1578566744661)
@@ -244,7 +244,8 @@
} else {

To be called with:

git diff --text --word-diff=porcelain | awk -v red="$(tput setaf 1)" -v green="$(tput setaf 2)" -v reset="$(tput sgr0)" -f ~/.dotfiles/scripts/worddiff.awk
juliushaertl / gist:75578e1fe9a1e8fee10ffe2f770598bf
Created March 22, 2019 08:17
cleanup bundled js files from gitattributes
cat .gitattributes | grep binary | awk '/./{gsub(/^\//, "", $1); print $1 }' | xargs git checkout --
for i in `seq 1 100`; do wget -O $i.jpg; done
juliushaertl /
Created February 3, 2018 00:54
github-merge-report for sending list of updated pull requests of the last day
from github import Github
from datetime import datetime, timedelta
date = - timedelta(days=1)
g = Github("username", "apikey")
query = "org:nextcloud type:pr is:merged base:master updated:>=%s" % date.strftime("%Y-%m-%d")
prs = g.search_issues(query, sort="updated", order="desc")
juliushaertl /
Last active May 14, 2024 19:38

convert google takeout archive for location history from kml to gpx and split file into one per day

gpsbabel -i kml -f Location\ History.kml -o gpx -F out.gpx
gpsbabel -t -i gpx -f out.gpx -x track,merge,pack,split,title="ACTIVE LOG # %Y%m%d" -o gpx -F split.gpx
python2 split.gpx
juliushaertl /
Last active October 11, 2017 10:40
Testing a pull request for Nextcloud apps

If you have installed an app from the app store and want to help testing a pull request you can easily apply the changes by using the patch commandline tool.

Take the pull request URL, append .patch to it and download the file:

Example for PR: nextcloud/deck#320


Apply the patch to your apps directory:

API documentation DRAFT

The OCS Registration API allows you to register for an account, check the status of the registration and get initial login credentials from within clients.

The base URL for all calls to the API is: <nextcloud_base_url>/ocs/v2.php/apps/registration/api/v1

If cloud providers implement that api they need to provide all of the endpoints described in the following.

All calls to OCS endpoints require the OCS-APIRequest header to be set to true.