Skip to content

Instantly share code, notes, and snippets.

View Emantor's full-sized avatar

Rouven Czerwinski Emantor

View GitHub Profile
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQENBFDkAtwBCAC5BFFBJCm270CwhMJtyIGl5+fhpJhKQXXEnhRYWkwxwkNnIF/b
2Su5o76ljH88dzndukdS4+8f+TYVZKLrUChAMF7ei99egPpVG+yU1rD5VznXMSn9
MPrvwkhlP/e1YrbZN5SehtbsZcKndynqOcNsKGh3VeYpjSDYKWPTohTrdINcrzNF
e1RUKZifktn/sJGn3GE4AMUdOcySHUxajxmmakY3iO/KLG0G9PLc4uJlv0WTuhYO
hWtSv4DG5Zq/i3Y7mLWpGCqsUOTgnrRalyqhLVSK7wdoePwLNANw7CZf0JtFcjJY
Nblma+sRFgONLE9f0Imto9yR0Ry6PcoqjWmzABEBAAG0M1JvdXZlbiBDemVyd2lu
c2tpIDxyLmN6ZXJ3aW5za2lAdHUtYnJhdW5zY2h3ZWlnLmRlPokBPgQTAQIAKAUC
#!/bin/bash
synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')

Keybase proof

I hereby claim:

  • I am Emantor on github.
  • I am emantor (https://keybase.io/emantor) on keybase.
  • I have a public key whose fingerprint is 399E 34DF 1CA1 3282 5703 631F 65FE FB87 3FDA 3D99

To claim this, I am signing this object:

@Emantor
Emantor / teamspeak.service
Last active November 16, 2015 10:27
teamspeak.service for systemd
[Unit]
Description=Teamspeak 3 Server
After=network.target
[Service]
User=teamspeak
WorkingDirectory=/var/lib/teamspeak/
Environment="LD_LIBRARY_PATH=/var/lib/teamspeak/"
ExecStart=/var/lib/teamspeak/ts3server_linux_amd64
@Emantor
Emantor / foscam
Created September 20, 2017 19:51
import requests
username='username'
password='password'
payload = {'usr': username, 'pwd': password}
url = 'http://192.168.178.175:88/cgi-bin/CGIProxy.fcgi'
import curses
stdscr = curses.initscr()
curses.cbreak()
@Emantor
Emantor / zyxel2graphite.py
Created October 3, 2018 03:16
zyxel2graphite.py
#!/usr/bin/python
"""Copyright 2013 Bryan Irvine
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@Emantor
Emantor / gist:e49c672c30f2177da64c4f66008eb76c
Last active October 8, 2018 19:39
update_desktop_dimensions
void
update_desktop_dimensions(void)
{
int i;
int x1 = INT_MAX, y1 = INT_MAX; /* top-left */
int x2 = INT_MIN, y2 = INT_MIN; /* bottom-right */
for (i = 0; i < screenInfo.numScreens; i++) {
ScreenPtr screen = screenInfo.screens[i];
@Emantor
Emantor / sdram.patch
Created April 2, 2020 11:56
BB persistent SDram region patch
From 49cccadb00a8132554ba046e124a4eb0453c1aab Mon Sep 17 00:00:00 2001
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Date: Thu, 2 Apr 2020 13:55:13 +0200
Subject: [PATCH] [WIP] persistent sdram_region
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
arch/arm/lib32/bootm.c | 2 +-
common/memory.c | 27 +++++++++++++++++++++++++++
@Emantor
Emantor / gist:1dc949426a150ad618a0ec4d67a9931f
Created May 25, 2020 05:05
Dconf read-only DB for NixOS
# Create a read-only DB with default theme and font settings.
programs.dconf.enable = true;
programs.dconf.profiles.user =
let
customDconf = pkgs.writeTextFile {
name = "nixos-user-dconf";
destination = "/dconf/nixos-user-custom";
text = ''
[org/gnome/desktop/interface]
cursor-theme='Numix-Cursor'
@Emantor
Emantor / gist:85da8cdb25b9c8272d4af1942cec6128
Last active August 21, 2020 09:25
nixpkgs-wayland legacy failure
/nix/st…/xr499xa41x7is0v04ipvkrq1shkwhjzl-source    sudo nixos-rebuild switch
unpacking 'https://github.com/nix-community/emacs-overlay/archive/master.tar.gz'...
unpacking 'https://github.com/edolstra/flake-compat/archive/c75e76f80c57784a6734356315b306140646ee84.tar.gz'...
fatal: '/nix/store/xr499xa41x7is0v04ipvkrq1shkwhjzl-source' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: program 'git' failed with exit code 128
(use '--show-trace' to show detailed location information)