Skip to content

Instantly share code, notes, and snippets.

@FSund
FSund / wayland_5680.md
Last active February 2, 2024 10:02
Enable Wayland on Arch on Dell Precision 5680

Tested on Arch with GNOME and GDM, using proprietary NVIDIA drivers on a Dell Precision 5680.

Install nvidia or nvidia-dkms version >=545.

Enable DRM KMS by adding kernel parameters modeset=1 and fbdev=1. If using systemd-boot edit your boot entry (for example /boot/loader/entries/arch.conf) and modify the options line as follows

options <existing options> modeset=1 fbdev=1

See here for other bootloaders.

# pollenvarsel rest api kall
- platform: rest
name: pollen_json
resource: https://pollenkontroll.no/api/middleware/pollen/901f3d22-b95f-4b64-a181-0b847b76b1a3?t=1620798857633
scan_interval: 21600
value_template: "OK"
json_attributes:
- "forecast"
# sensorer
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
from cmath import sqrt, pi
# set up plot look
mpl.rcParams['lines.linewidth'] = 1.0 # reduce default line width
mpl.rcParams['mathtext.fontset'] = 'cm'
mpl.rcParams['font.family'] = 'serif'
@FSund
FSund / novelkeys_web_scraper.py
Created May 1, 2019 06:29
Novelkeys/Gateron Ink web scraper
# sources:
# https://www.adventuresintechland.com/detect-when-a-webpage-changes-with-python/
# https://chrisalbon.com/python/web_scraping/monitor_a_website/
import hashlib
import urllib # use built-in urllib
import random
import time
from bs4 import BeautifulSoup as soup
from pushbullet import Pushbullet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.