Skip to content

Instantly share code, notes, and snippets.

View ericosur's full-sized avatar

ericosur ericosur

  • Taipei
  • 08:39 (UTC +08:00)
View GitHub Profile
@huaminghuangtw
huaminghuangtw / autohotkey-media-control.ahk
Last active September 24, 2024 03:02
Keyboard shortcuts for media control in Windows 10 using AutoHotkey
^!Space::Media_Play_Pause ;"Ctrl + Alt + Space" to play/pause/resume media
^!Shift::Volume_Mute ;"Ctrl + Alt + Shift" to toggle mute/unmute
^!Left::Media_Prev ;"Ctrl + Alt + ⭠" to play previous clip
^!Right::Media_Next ;"Ctrl + Alt + ⭢" to play next clip
^!Up::Volume_Up ;"Ctrl + Alt + ⭡" to increase volume
^!Down::Volume_Down ;"Ctrl + Alt + ⭣" to reduce volume
@desaster
desaster / keychron-q3-customizations.diff
Created October 12, 2022 17:53
My personal customizations to the Keychron Q3 VIAL firmware
My personal customizations to the Keychron Q3 VIAL firmware.
* Add some custom backlight to certain keys if "mac" layer is enabled. This is
done because I use the "mac" layer to remap some keys to F-keys for quick
access, so this modification lights them up for clarity
* new custom keycode KC_BRCYCLE will cycle through three different backlight
brightnesses. I map this to Fn-Space, so it behaves a bit like the backlight
settings on my Lenovo laptop
import android.content.Context
import android.graphics.Point
import android.os.Build
import android.view.WindowManager
import kotlin.math.pow
import kotlin.math.sqrt
/**
* An extension function to return current device real width and height
*/
@anonymous1184
anonymous1184 / VSCode.md
Last active August 12, 2024 01:55
AHK Debugging with Visual Studio Code

AHK Debugging with Visual Studio Code

Created on 2021/11/03 with VSCode version 1.53.
Last revision on 2022/06/30 with VSCode version 1.68.2.

I'm not a native English speaker, so please report inconsistencies to [u/anonymous1184][00] (or send a .patch of the [source][01]).

Table of Contents

@oofnikj
oofnikj / answerfile
Last active April 22, 2025 09:28
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@trevren11
trevren11 / luamacros.lua
Last active September 20, 2023 07:48
LuaMacros examples for second keyboard for use with debugging and android studio
-- assign logical name to macro keyboard
-- lmc_assign_keyboard('MACROS')
-- lmc_minimize();
-- lmc_reset();
lmc_say('Loading keyboard configuration')
lmc.minimizeToTray = false
-- lmc_minimize()
-- lmc_load('E:\\lmc.lua')
-- The function returns title of active window. Useful if you want different behaviour of macros depending of active application.
@arjunv
arjunv / keyevents.json
Created December 2, 2018 00:01
All Android Key Events for usage with adb shell
{
"key_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"key_0": "adb shell input keyevent 7",
@rewida17
rewida17 / termux
Last active March 20, 2025 10:27
Run termux env via eg adb shell
#!/system/xbin/bash
#Based on https://github.com/termux/termux-app/issues/77
export PREFIX='/data/data/com.termux/files/usr'
export HOME='/data/data/com.termux/files/home'
export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib'
export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:$PATH"
export LANG='en_US.UTF-8'
export SHELL='/data/data/com.termux/files/usr/bin/bash'
export BIN='/data/data/com.termux/files/usr/bin'
export TERM=vt220
@cyhsutw
cyhsutw / MathJax.ipynb
Last active February 22, 2025 20:17
Grabbed from https://github.com/odewahn/ipynb-examples, converted to v3 for GitHub to render.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ViktorNova
ViktorNova / rotate-video.sh
Created August 8, 2016 21:33
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO