Skip to content

Instantly share code, notes, and snippets.

👋
.

Julius Härtl juliushaertl

👋
.
Block or report user

Report or block juliushaertl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@juliushaertl
juliushaertl / gist:75578e1fe9a1e8fee10ffe2f770598bf
Created Mar 22, 2019
cleanup bundled js files from gitattributes
View gist:75578e1fe9a1e8fee10ffe2f770598bf
cat .gitattributes | grep binary | awk '/./{gsub(/^\//, "", $1); print $1 }' | xargs git checkout --
View gist:e05eb309afde43ab639c9d377f75e1b5
for i in `seq 1 100`; do wget https://picsum.photos/3000/2000/?random -O $i.jpg; done
@juliushaertl
juliushaertl / github-merge-report.py
Created Feb 3, 2018
github-merge-report for sending list of updated pull requests of the last day
View github-merge-report.py
from github import Github
from datetime import datetime, timedelta
date = datetime.today() - 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
juliushaertl / google-location-history-to-gpx.md
Last active Aug 27, 2018
google-location-history-to-gpx
View google-location-history-to-gpx.md

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 gpxsplitter.py split.gpx
@juliushaertl
juliushaertl / nextcloud-app-test-pr.md
Last active Oct 11, 2017
Testing a pull request for Nextcloud apps
View nextcloud-app-test-pr.md

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: https://github.com/nextcloud/deck/pull/320

wget https://github.com/nextcloud/deck/pull/320.path

Apply the patch to your apps directory:

View nextcloud-registration-api-test.md

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.

View abfall2ics_wuerzburg.py
import json, requests
from icalendar import Calendar, Event, Alarm
from datetime import date, datetime, time, timedelta
from calendar import monthrange
from html.parser import HTMLParser
pars = HTMLParser()
addr = "19935"
year = 2018
@juliushaertl
juliushaertl / mysql_convert_mb4.sh
Created Oct 26, 2016
convert a mysql table to utf8mb4 (useful for migration to mb4 on Nextcloud)
View mysql_convert_mb4.sh
#!/bin/bash
#
# CHANGE VALUES OF DATABASE AND MYSQL TO MATCH YOUR SETUP
DATABASE="devncmaster"
MYSQL="mysql -N --database=$DATABASE"
# convert database with all tables to utf8mb4
echo "ALTER DATABASE $DATABASE CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin;" | $MYSQL
View hackzogtum.user.js
// ==UserScript==
// @name Hackzogtum Donate via Amazon
// @version 1.70
// @description Donate money to Hackzogtum, while shopping at different Shops
// @match *://www.amazon.de/*
// @grant GM_getValue
// @grant GM_setValue
// @updateURL
View gist:b9d1f112360c2a839c23
### Keybase proof
I hereby claim:
* I am juliushaertl on github.
* I am juliushaertl (https://keybase.io/juliushaertl) on keybase.
* I have a public key whose fingerprint is 8E35 BE84 64C4 39E6 66C5 19DB 4C61 4C6E D2CD E6DF
To claim this, I am signing this object:
You can’t perform that action at this time.