Skip to content

Instantly share code, notes, and snippets.

View dreua's full-sized avatar

David Auer dreua

View GitHub Profile
@dreua
dreua / oo.example.com.conf
Created December 22, 2020 14:59
Apache reverse proxy configuration for OnlyOffice + Humhub
# MDomain in humhub site config to make it one certificate.
# TODO on next patchday: remove http config
<VirtualHost *:80>
ServerName oo.example.com
DocumentRoot /var/www/oo.example.com/html
ErrorLog /var/www/oo.example.com/log/error.log
CustomLog /var/www/oo.example.com/log/requests.log combined
</VirtualHost>
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
print('Installed GTK+ version is ' +
'.'.join([str(Gtk.get_major_version()),
str(Gtk.get_minor_version()),
str(Gtk.get_micro_version())]))
class MyWindow(Gtk.Window):
def __init__(self):
#!/bin/python3
from PyPDF2 import PdfFileReader, PdfFileWriter
from PyPDF2.pdf import PageObject
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('first', help='First file (first page becomes first page)')
parser.add_argument('second', help='Second file (first page becomes second page)')
parser.add_argument('output', nargs='?', help='Output file name (optional)')
@dreua
dreua / merge_pdfs.py
Last active April 28, 2023 01:30 — forked from Geekfish/merge_pdfs.py
pyPDF2 merge 2 pdf pages into one
#!/bin/python3
from PyPDF2 import PdfFileReader, PdfFileWriter
from PyPDF2 import PageObject
# Theses files are just for testing, no point in merging these
reader = PdfFileReader(open("Nextcloud Manual.pdf",'rb'))
# this defines the output page format (relevant if not the same)
@dreua
dreua / asdfbrackets
Last active December 20, 2022 18:13
On German keyboards, typing the brackets and braces like {[]} is quite annyoing (especialy when programming) so I remapped them to AltGr+asdf which is much better imo. This is tested on Fedora Linux but it should work on most Linuxes.
# Save this file as /usr/share/X11/xkb/symbols/asdfbrackets
# Thanks to: BRPocock's answer at
# https://ask.fedoraproject.org/en/question/73014/how-to-assign-ctrl-up-to-home-ctrl-down-to-end-ctrl-left-to-page-up-and-ctrl-right-to-page-down/?answer=73021#post-id-73021
partial alphanumeric_keys
xkb_symbols "asdfbrackets" {
name[Group1]="brackets on AltGr+asdf";
key <AC01> { [ a, A, braceleft, AE ] };
@dreua
dreua / Nautilus_Terminal_Shortcut.md
Last active February 23, 2024 23:23
Simple instructions for adding a shortcut to nautilus which opens a terminal at the current location

I copied this from "RobotMan" on http://askubuntu.com/a/696901

I added a new feature to Nautilus with the precious help of the maintainers.

This new feature allow you to map custom keyboard shortcuts to launch the scripts in the scripts folder ( ~/.local/share/nautilus/scripts ).

So, when you add an executable in that folder it will appear in the right-click context menu, but now if you create a special configuration file ( ~/.config/nautilus/scripts-accels ) you can assign a shortcut to it.

For example make a script called Terminal with the following content: