Skip to content

Instantly share code, notes, and snippets.

@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},
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
21716403
21716143
21715942
21715985
21715982
21715991
21715974
21716248
21715868
21716196
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
17980862
21698882
21698888
21698918
21698912
21698915
21698910
21698906
21698900
21698885
1 12306
2 53689
3 4373
4 4724
5 10836
6 5374
7 4809
8 22474
9 4723
10 11769
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
21591117
21587456
21588449
21586210
21589855
21586021
21587234
21587339
21588792
21586385
@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
const useBar = () => {
// some code to get the value of x
return {
x,
};
};
interface Foo {
x: number;
}
const Component = () => {
const foo: Foo = useBar();
React.useEffect(() => {
// hook using foo.x
}, [foo]);