Skip to content

Instantly share code, notes, and snippets.

View ClassicOldSong's full-sized avatar
🐦

Yukino Song ClassicOldSong

🐦
View GitHub Profile
@ClassicOldSong
ClassicOldSong / pause.ahk
Last active February 16, 2025 18:48
Auto Pause/Resume script for providing console grade experience with Apollo
#Requires AutoHotkey v2.0
#SingleInstance Force
DetectHiddenWindows true
; Globals to manage the suspend/resume state
global IsProcessSuspended := false
global IsProcessResumed := false
LockFile := A_Temp "\AutoPauseResume.lock"
param (
[string]$exePath = "C:\Program Files\Apollo\sunshine.exe",
[string]$workingDirectory = "C:\Program Files\Apollo\",
[string]$sessionId = (Get-Process -PID $pid).SessionID,
# Path to PsExec
# You can download it from https://learn.microsoft.com/en-us/sysinternals/downloads/psexec
[string]$psexecPath = "D:\Tools\pstools\PsExec.exe",
# Adjust with the actual config files you want to start.
# e.g. if you have only one config, leave only the first entry.
[string[]]$exeParams = @(
@ClassicOldSong
ClassicOldSong / Q2.kcm
Created July 4, 2024 16:02
OnePlus Pad Pro keyboard mapping
# Copyright (C) 2024 Yukino Song
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ClassicOldSong
ClassicOldSong / efml-prompt.md
Created March 25, 2023 22:23
Prompt trying to teach ChatGPT to write EFML

Use only the information mentioned here, do not use anything from Vue.js, React, Svelte etc.

  1. EF.js is a JavaScript library that uses EFML, a logic-free template language, to create dynamic user interfaces.
  2. EFML is a simple and easy-to-use template language that focuses on data binding and event handling.
  3. In EFML, lines not starting with >#%@.|+- are considered comments.
  4. Each EFML tag, attribute, property, event handler, text node, and mount point must start on a new line.
  5. Tags are defined using the > character, and can include class names and reference names. Shorthand for class names can be used by including a . after the tag name.
  6. Reference names for elements are defined using the # character at the end of the tag definition.
  7. Attributes are defined using the # character, and can include any valid HTML attribute. They must be defined on a new line after the tag definition.
  8. Properties are defined using the % character, and can include any valid JavaScript object property.
# this file contains keys needed for decryption of file system data (WUD/WUX)
# 1 key per line, any text after a '#' character is considered a comment
# the emulator will automatically pick the right key
541b9889519b27d363cd21604b97c67a # example key (can be deleted)
d7b00402659ba2abd2cb0db27fa2b656 # Common
805e6285cd487de0faffaa65a6985e17 # Espresso Ancast
b5d8ab06ed7f6cfc529f2ce1b4ea32fd # Starbuck Ancast
9a164ee15ac7ceb64d3cc130094095f6 # 007 Legends [EUR, NUS]
@ClassicOldSong
ClassicOldSong / app.jsx
Last active December 19, 2022 18:43
Solidjs + NativeScript + SwiftUI
import { Application } from "@nativescript/core"
import { render } from "@dominative/solid"
import { createSignal } from "solid-js"
import { registerElement } from 'dominative'
import { SwiftUI, registerSwiftUI, UIDataDriver } from '@nativescript/swift-ui'
registerElement('swiftui', SwiftUI)
registerSwiftUI("sampleView", (view) =>
/* Usage:
import parseEft from 'eft-parser'
import compileToXML from 'ef-ast-xml-compiler-with-data.js'
const ast = parseEft(`
>h1
.Hello {{name}}!
-mountPoint
+listMountPoint
`)
@ClassicOldSong
ClassicOldSong / tmuxlogin
Last active November 21, 2023 22:49
Use tmux as your login shell
#!/bin/bash
# Usage:
# Download this file
# Put it in /bin or wherever you want, eg: `/bin/tmuxlogin`
# Give it excutable permission, eg: `sudo chmod +x /bin/tmuxlogin`
# Modify your `/etc/shells` and add `/bin/tmuxlogin` to it
# Modify your `~/.tmux.conf` and add `set-option -g default-shell /bin/bash(or whatever shell you want)` to it
# `chsh -s /bin/tmuxlogin`
# Done!
@ClassicOldSong
ClassicOldSong / MouseDelta.ahk
Last active December 31, 2024 09:09
AHK for enhancing GPD Pocket. Run pocket_enhancement.ahk. Feature: Esc + Mouse movenent = ScrollWheel, CapsLock + PrtScn = Region Screen Capture
; Instantiate this class and pass it a func name or a Function Object
; The specified function will be called with the delta move for the X and Y axes
; Normally, there is no windows message "mouse stopped", so one is simulated.
; After 10ms of no mouse movement, the callback is called with 0 for X and Y
Class MouseDelta {
State := 0
__New(callback){
;~ this.TimeoutFn := this.TimeoutFunc.Bind(this)
this.MouseMovedFn := this.MouseMoved.Bind(this)
@ClassicOldSong
ClassicOldSong / surfingkeys.js
Last active November 7, 2019 13:40
My SurfingKeys Configuration
/* Original gist from deluxghost
* https://gist.github.com/deluxghost/f15e304ab18214e6a39587e17b63dd4d
*/
unmap('cp');
unmap('spa');
unmap('spb');
unmap('spd');
unmap('sps');
unmap('spc');