Skip to content

Instantly share code, notes, and snippets.

View karatatar's full-sized avatar
🎯
Focusing

karatatar

🎯
Focusing
View GitHub Profile
@karatatar
karatatar / README.markdown
Created June 11, 2025 05:21 — forked from mattdenner/README.markdown
Suspend and then hibernate after 60 minutes

I found a post about suspending and then going into hibernate that included a really clever script. Turns out that with NixOS this is even esaier to coordinate as you have systemd so can have a before and after service. I just include this in my /etc/nixos/configuration.nix file and nixos-rebuild; then a systemctl suspend or a close of the lid will cause the hibernate timer to be set.

@karatatar
karatatar / 1-termux-adb.md
Created May 11, 2024 12:07 — forked from kairusds/1-termux-adb.md
Instructions for connecting Termux's android-tools adb to the current device via Wireless debugging and fixing phantom process killing

Install android-tools if you haven't already:

pkg update ; pkg upgrade
pkg install android-tools

adb pair ipaddr:port
@karatatar
karatatar / index.html
Created December 18, 2023 13:46
Stock Chart
<script src="https://cdn.amcharts.com/lib/5/index.js"></script>
<script src="https://cdn.amcharts.com/lib/5/xy.js"></script>
<script src="https://cdn.amcharts.com/lib/5/stock.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js"></script>
<div id="chartcontrols"></div>
<div id="chartdiv"></div>
@karatatar
karatatar / index.html
Created March 17, 2023 10:55
Upload user avatar with a custom upload button
<main>
<input type="file" name="image" id="image" accept="image/*" />
<div id="preview">
<div id="avatar"></div>
<button
id="upload-button"
aria-labelledby="image"
aria-describedby="image"
>
🙂
@karatatar
karatatar / dabblet.html
Created February 15, 2023 10:16
Untitled
<label for="pet-select">Choose a pet:</label>
<select name="pets" id="pet-select">
<option value="">--Please choose an option--</option>
<option value="dog">Dog</option>
<option value="cat">Cat</option>
<option value="hamster">Hamster</option>
<option value="parrot">Parrot</option>
<option value="spider">Spider</option>
<option value="goldfish">Goldfish</option>
@karatatar
karatatar / index.html
Created September 9, 2022 00:13
(v2) Button - Hold to confirm (Accessible)
<button class="button-hold">
<div>
<svg class="progress" viewBox="0 0 32 32">
<circle r="8" cx="16" cy="16" />
</svg>
<svg class="tick" viewBox="0 0 24 24">
<polyline points="18,7 11,16 6,12" />
</svg>
</div>
<ul>
@karatatar
karatatar / vim-heroku.sh
Last active August 18, 2022 20:49 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2022
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
alias vi=vim
@karatatar
karatatar / wsl2-network.ps1
Created April 7, 2022 09:14 — forked from xmeng1/wsl2-network.ps1
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@karatatar
karatatar / seri2.csv
Created January 19, 2021 09:20
seri2.csv
Date NY SF
2007-01-01 51 45
2007-01-02 48 56
2007-01-03 46 54
2007-01-04 51 52
2007-01-05 57 49
2007-01-06 64 50
2007-01-07 51 53
2007-01-08 49 53
2007-01-09 41 56
@karatatar
karatatar / seri.csv
Created January 19, 2021 08:47
seri
Date NY SF
2007-01-01 46;51;56 43;45;48
2007-01-02 43;48;52 48;56;63
2007-01-03 39;46;53 50;54;62
2007-01-04 44;51;58 45;52;56
2007-01-05 51;57;62 44;49;58
2007-01-06 55;64;72 40;50;60
2007-01-07 46;51;56 45;53;63
2007-01-08 40;49;57 43;53;64
2007-01-09 37;41;45 49;56;66