Skip to content

Instantly share code, notes, and snippets.

@Langerz82
Langerz82 / emuelec-bluetooth
Last active January 22, 2024 05:33
EE - 4.7 - emuelec-bluetooth - test version
#!/usr/bin/python -u
################################################################################
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present ebeem (https://github.com/ebeem)
# Modifications made by:
# Langerz82 (https://github.com/Langerz82)
# wang80919 (https://github.com/wang80919)
# Testing done by:
# junm6802030 (https://github.com/junm6802030)
@Langerz82
Langerz82 / applyTextStroke.js
Last active September 6, 2023 07:44
Apply Text Stroke Made into a function by className.
var applyTextStroke = function (className, color, width)
{
var r = width;
var n = Math.ceil(2*Math.PI*r); /* number of shadows */
var str = '';
for(var i = 0;i<n;i++) /* append shadows in n evenly distributed directions */
{
var theta = 2*Math.PI*i/n;
str += (r*Math.cos(theta))+"px "+(r*Math.sin(theta))+"px 0 "+color+(i==n-1?"":",");
}
@Langerz82
Langerz82 / emuelec-bluetooth
Last active July 12, 2023 08:55
EE - emuelec-bluetooth v4.7.2
#!/usr/bin/python -u
from subprocess import Popen, PIPE, STDOUT
from dataclasses import dataclass
import time
import sys
import os
import re
from threading import Thread
from multiprocessing import Process
@Langerz82
Langerz82 / emuelec-bluetooth
Last active July 10, 2023 01:42
EE - emuelec-bluetooth v2
#!/usr/bin/env python
from subprocess import Popen, PIPE, STDOUT
from dataclasses import dataclass
import time
import sys
import os
import re
from threading import Thread
from multiprocessing import Process
@Langerz82
Langerz82 / setres.sh
Created July 5, 2023 00:31
EE 4.6 - Experimental Set Resolution
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)
# Read the video output mode and set it for emuelec to avoid video flicking.
# This file sets the hdmi output and frame buffer to the argument in pixel width.
# Allowed argument example ./setres.sh 1080p60hz <-- For height 1080 pixels.
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
# Source predefined functions and variables
. /etc/profile
# Place any scripts you need to run at boot on this file
#!/usr/bin/env python
from subprocess import Popen, PIPE, check_output
from dataclasses import dataclass
import time
import sys
import os
import re
DEBUG = False
#!/usr/bin/env python
from subprocess import Popen, PIPE
from dataclasses import dataclass
import time
import sys
DEBUG = False
> bluetoothctl power on
Changing power on succeeded
> bluetoothctl agent on
> bluetoothctl discoverable on
Changing discoverable on succeeded
> bluetoothctl pairable on
Changing pairable on succeeded
@Langerz82
Langerz82 / emuelec-bluetooth
Last active June 2, 2023 12:02
EmuELEC dev - emuelec-bluetooth - v3 - issues - see comments.
#!/usr/bin/env python
from subprocess import Popen, PIPE
from dataclasses import dataclass
import time
DEBUG = True
@dataclass