Skip to content

Instantly share code, notes, and snippets.

View Langerz82's full-sized avatar

Joshua L Langerz82

View GitHub Profile
@Langerz82
Langerz82 / emuelec-libretro-cores-bumper.sh
Created November 5, 2024 17:45
EmuELEC - script for obtaining latest libretro cores file.
#!/bin/bash
rm -r source
mkdir -p ./source
for i in `find -type d -maxdepth 1 -mindepth 1`; do
DIRNAME="${i:2}"
DIRNAME="${DIRNAME%/}"
SITE=$(cat ./${DIRNAME}/package.mk | grep PKG_SITE= | cut -d'"' -f2)
[[ -z "${SITE}" ]] && continue
@Langerz82
Langerz82 / midi_template.sh
Last active August 11, 2024 06:18
EmuELEC - Midi Template for Kelv
#!/bin/bash
RA_CFG=/storage/.config/retroarch/retroarch.cfg
set_midi_source()
{
local midi_source=$1
pkill -9 timidity
pkill -9 mt32d
#!/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?"":",");
}