Skip to content

Instantly share code, notes, and snippets.

#!/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)
#!/usr/bin/env python
import signal
from bluetool.agent import Client, AgentSvr
class MyClient(Client):
def request_pin_code(self, dev_info):
print(dev_info)
@Langerz82
Langerz82 / emuelec-bluetooth.py
Created July 26, 2024 11:11
EE - emuelec-bluetooth - add accept authorization request.
#!/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 / bt_helper.sh
Created July 25, 2024 16:00
Emuelec 4.8 - Bluetooth Helper
#!/usr/bin/env python
import time
from bluetool import Bluetooth
if __name__ == "__main__":
bt = Bluetooth()
print('Scanning for available devices for 60 seconds, please wait...')
bt.make_discoverable();
bt.start_scanning(60)
@Langerz82
Langerz82 / es_systems.cfg
Created April 25, 2024 15:14
python scripts
< <system>
<name>Python Scripts</name>
<fullname>Python Scripts</fullname>
<manufacturer></manufacturer>
<release></release>
<hardware></hardware>
<path>/emuelec/scripts</path>
<extension>.py .PY</extension>
<command>/usr/bin/python %ROM%</command>
<platform>python</platform>
<system>
<name>SH Scripts</name>
<fullname>SH Scripts</fullname>
<manufacturer></manufacturer>
<release></release>
<hardware></hardware>
<path>/emuelec/scripts</path>
<extension>.sh .SH</extension>
<command>%ROM%</command>
<platform>scripts</platform>
@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