Skip to content

Instantly share code, notes, and snippets.

#Requires AutoHotkey v2.0
class MouseToggler {
__New() {
this.left_state := false
this.right_state := false
}
Left() {
If this.left_state := !this.left_state
Click 'Down'
@hfsaito
hfsaito / plants_vs_zombies.ahk
Created May 26, 2024 06:00
Shortcuts in AutoHotKey for Plants vs. Zombies
#Requires AutoHotkey v2.0
PVZ_WINDOW_TITLE := "Plants vs. Zombies"
class Base {
static CARD_COORD := [
{x: 0.14583333333333334, y: 0.06666666666666667},
{x: 0.2111111111111111, y: 0.06666666666666667},
{x: 0.26944444444444443, y: 0.06666666666666667},
{x: 0.34375, y: 0.06666666666666667},
{x: 0.3840277777777778, y: 0.06666666666666667},
id name type_1 type_2 hp attack defense special speed
150 Mewtwo psychic 106 110 90 154 130
149 Dragonite dragon flying 91 134 95 100 80
151 Mew psychic 100 100 100 100 100
146 Moltres fire flying 90 100 90 125 90
145 Zapdos electric flying 90 90 85 125 100
144 Articuno ice flying 90 85 100 125 85
091 Cloyster water ice 50 95 180 85 70
130 Gyarados water flying 95 125 79 100 81
059 Arcanine fire 90 110 80 80 95
@hfsaito
hfsaito / streamaudio.sh
Created May 7, 2022 13:51
Workaround to stream audio of an app through discord in ubuntu
#!/bin/bash
# List inputs to get the mic name
# pactl list sources | grep "Source\|State\|Name\|Description"
# List outputs to get hte output name
# pactl list sinks | grep "Sink\|State\|Name\|Description"
# Creates 2 audio nodes
pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description=StreamAudio