Skip to content

Instantly share code, notes, and snippets.

View freundTech's full-sized avatar
🖥️

Adrian Freund freundTech

🖥️
View GitHub Profile
@freundTech
freundTech / 0001-HID-amd_sfh-Add-support-for-tablet-mode-switch-senso.patch
Last active December 10, 2022 09:34
Updated Tablet Mode Switch support for AMD Sensor Fusion Hub
From d0e733cd14c5939ec9f21e2c5093b5a2eb56cabb Mon Sep 17 00:00:00 2001
From: Adrian Freund <adrian@freund.io>
Date: Thu, 8 Dec 2022 10:22:09 +0100
Subject: [PATCH] HID: amd_sfh: Add support for tablet-mode-switch sensor
This patch adds support for the tablet mode switch sensors on
convertible devices where that sensor is managed by AMD SFH.
Co-developed-by: Ivan Dovgal <iv.dovg@gmail.com>
Signed-off-by: Ivan Dovgal <iv.dovg@gmail.com>
import sys
import random
def main():
text = sys.argv
output = [shuffle(x) for x in text[1:]]
print(" ".join(output))
@freundTech
freundTech / style.plantuml
Created May 10, 2019 13:21
KIT style for plantuml
skinparam usecase {
BackgroundColor #009682
BorderColor #006d5e
ArrowColor #000000
FontColor #ffffff
}
skinparam actor{
BackgroundColor #ffffff
@freundTech
freundTech / skewb_first_layer.py
Last active September 1, 2018 11:39
Calculates an optimal solution for the first layer on a skewb
#!/usr/bin/env python3
from enum import Enum
from queue import Queue
from copy import deepcopy
NUM_FACES = 6
class Axis(Enum):
U = 1
107 uuid="2ca8072f-74be-4798-85b8-bbce03aa91af" Tywnis
61 uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8" Plastix
55 uuid="dad8b95c-cf6a-44df-982e-8c8dd70201e0" ElectroidFilms
48 uuid="2a289d2a-d970-49c5-9a6c-01fc0264e317" StealthMedia
44 uuid="459fd919-0d58-401a-9601-6cab1eb721ab" Reshif
42 uuid="fe3608b7-d105-4029-8800-34b3147065b6" rockymine
41 uuid="e37f18f1-117b-47db-8806-6d3a0854b518" Chicky
36 uuid="621b2aa8-4e5f-4ed8-bd36-0ae2f8952a06" Strangey
32 uuid="e79fbdc9-627e-4dac-97a6-81a3046220d7" AtlasGames
30 uuid="38ab65dd-95f9-406f-917c-6accc995421f" GoldenOre
#!/usr/bin/env python3
from collections import OrderedDict
from xml.etree import ElementTree as ET
import sys
import re
import json
from urllib.request import Request, urlopen
from urllib.parse import urlencode
#!/usr/bin/env python2
import sys
import os
import gtk
import gobject
import webkit
import Queue
import threading
from time import sleep
import re
# Maintainer: Adrian Freund <freundadrian@gmail.com>
pkgname=('python2-javascriptcore-git')
_pkgname='pyjavascriptcore'
pkgver=v1.0.r2.gdb9d8e9
pkgrel=1
pkgdesc="Javascript Core for Python (When using WebKit2Gtk)"
url="https://github.com/freundTech/pyjavascriptcore"
license=('GPL2')
arch=('i686' 'x86_64')
#include <stdio.h>
#include <jpeglib.h>
#include <iostream>
#include <iomanip>
#include <sstream>
using namespace std;
JBLOCKARRAY rowPtrs[MAX_COMPONENTS];
import asyncio, logging, re, string
from pushbullet import PushBullet
import plugins
from utils import remove_accents
logger = logging.getLogger(__name__)