Skip to content

Instantly share code, notes, and snippets.

View Xartos's full-sized avatar

Fredrik Liv Xartos

View GitHub Profile
@Xartos
Xartos / add-umea-office-printer.sh
Last active December 14, 2023 12:53
Setting up a printer at Elastisys Umeå Office on linux
# Install the umeå printer using the network protocol (ipp)
# Install printer
lpadmin -p 'bizhub-C3320i' -L 'Printer Corner' -v ipp://printer.printer -o PageSize=A4
# Make it default
lpadmin -d 'bizhub-C3320i'
# Enable printer
cupsenable bizhub-C3320i
@Xartos
Xartos / system-info-collector.py
Last active August 19, 2022 14:55
Small python script that collects some system information and outputs it into a
#!/usr/bin/python3
import json
import os
import subprocess
import pyedid
def get_displays():
displays=[]
for file in os.listdir("/sys/class/drm/"):
@Xartos
Xartos / save-connected-displays.py
Last active August 19, 2022 11:01
Python scriptto save serial number and name for all connected displays into a json file.
import json
import os
import pyedid
import sys
if len(sys.argv) < 2:
print("Usage:", sys.argv[0], "<name of location>", file=sys.stderr)
exit(1)
database_file_name="screens.json"
@Xartos
Xartos / opsgenie-alarm-tasker-project.prj.xml
Last active May 16, 2022 12:23
Tasker project that will set an alarm 1 minute after you've gotten an SMS from "OpsGenie"
<TaskerData sr="" dvi="1" tv="5.15.14">
<Profile sr="prof2" ve="2">
<cdate>1642400228834</cdate>
<edate>1652702737450</edate>
<flags>8</flags>
<id>2</id>
<mid0>3</mid0>
<nme>Alarm If Opsgenie SMS</nme>
<Event sr="con0" ve="2">
<code>7</code>
@Xartos
Xartos / keybase.md
Created December 16, 2019 08:13
Proof of my identity

Keybase proof

I hereby claim:

  • I am Xartos on github.
  • I am freddeliv (https://keybase.io/freddeliv) on keybase.
  • I have a public key whose fingerprint is 70F1 D6BB DCFD E47C 0919 A8D9 BB88 F471 C875 7143

To claim this, I am signing this object: