Skip to content

Instantly share code, notes, and snippets.

# install torch with CUDA support. See https://pytorch.org/get-started/locally/ for more instructions if this fails.
pip install torch --extra-index-url https://download.pytorch.org/whl/cu113
# check if torch supports GPU; this must output "True". You need CUDA 11. installed for this. You might be able to use
# a different version, but this is what I tested.
python -c "import torch; print(torch.cuda.is_available())"
# clone web ui and go into its directory
git clone https://github.com/enryu43/anifusion-sd-webui.git
cd anifusion-sd-webui
@qzm
qzm / aria2.conf
Last active April 27, 2024 04:59
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@dhh
dhh / linux-setup.sh
Last active April 27, 2024 04:52
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@senthilmpro
senthilmpro / js-kebab-case.js
Created January 12, 2020 04:25
JS kebab case
const toKebabCase = str =>
str &&
str
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
.map(x => x.toLowerCase())
.join('-');
@0xallie
0xallie / 99bottles.dc
Last active April 27, 2024 04:51
99 Bottles of Beer in dc
99[[No more]n]sZ[[no more]n]sz[dn]sn[[s]n]ss[[Take one down and pass it around, ]n1-d0=zd0!=n[ bottle]nd1!=s[ of beer on the wall.]ps0]st[[Go to the store and buy some more, 99 bottles of beer on the wall.]ps0]sg[d0=Zd0!=n[ bottle]nd1!=s[ of beer on the wall, ]nd0=zd0!=n[ bottle]nd1!=s[ of beer.]ps0d0=gd0!=td0<r]srlrx0lrx
@0xallie
0xallie / 3rd_party_cookie_wl.md
Last active April 27, 2024 04:51
3rd-party cookie whitelist
@0xallie
0xallie / noscript_surrogates.md
Last active April 27, 2024 04:50
NoScript surrogates for pastebins

These are NoScript surrogates for some pastebins that require JavaScript but offer a raw version. The surrogates allow you to view pastes, but not create new pastes.

dropb.in

noscript.surrogate.dropbin.replacement = location.replace("/t" + location.pathname);
noscript.surrogate.dropbin.sources = !dropb.in
noscript.surrogate.dropbin.exceptions = ^https?://dropb\.in/(?:t/|$)
@0xallie
0xallie / archivebookmarklets.md
Created June 3, 2016 17:32
Bookmarklets to archive a page at the Internet Archive, WebCite and Archive.is

Archive bookmarklets

Internet Archive

javascript:void(open('https://web.archive.org/save/'+encodeURI(document.location)))

WebCite

supybot.plugins.GitHub.format.before.push: cif [ceq [echo $after__short] 0000000] "utilities ignore" "echo \\"[\x0310$repository__name\x03]\\" \x0307$sender__login\x03 [gh.pushinfo] [gh.numcommits] \x0309$ref__branch\x03 [format join \\" \\" [gh.fpushinfo] \\"\x0313$compare__tiny\x03\\"]"
supybot.plugins.GitHub.format.push: echo "[\x0310$repository__name\x03]" [color 07 [gh.commitauthor]] \x0314$__commit__id__short\x03 $__commit__message__firstline
supybot.plugins.GitHub.format.commit_comment: echo "[\x0310$repository__name\x03]" \x0307$comment__user__login\x03 commented on commit \x039$comment__commit_id__short\x03 \x0313$comment__html_url__tiny\x03
supybot.plugins.GitHub.format.issues: echo "[\x0310$repository__name\x03]" \x0307$sender__login\x03 $action issue [concat "\x0309#$issue__number\x03" [cif [ceq [echo $label__name] [echo $$label__name]] "echo :" "echo \\" as \x0308$label__name\x03:\\""]] $issue__title \x0313$issue__html_url__tiny\x03
supybot.plugins.GitHub.format.issue_comment: echo "[\x0310$repos
@0xallie
0xallie / limnoria-github-notifico-formats.txt
Last active April 27, 2024 04:48
Notifico-like formats for Limnoria's GitHub plugin
config plugins.GitHub.format.commit_comment "echo \"[\x0310$repository__name\x03]\" \x0307$comment__user__login\x03 commented on commit \x039$comment__commit_id__short\x03 \x0313$comment__html_url__tiny\x03"
config plugins.GitHub.format.create "echo \"[\x0310$repository__name\x03]\" \x0307$sender__login\x03 created $ref_type \x0309$ref\x03"
config plugins.GitHub.format.delete "echo \"[\x0310$repository__name\x03]\" \x0307$sender__login\x03 \x0304deleted\x03 $ref_type \x0309$ref\x03"
config plugins.GitHub.format.gollum "echo \"[\x0310$repository__name\x03]\" \x0307$sender__login\x03 $__page__action wiki page \x0309$__page__title\x03 \x0313$__page__html_url__tiny\x03"
config plugins.GitHub.format.issue_comment "echo \"[\x0310$repository__name\x03]\" \x0307$sender__login\x03 [cif [ceq [echo $action] created] \"echo commented\" \"echo $action a comment\"] on issue \x0309#$issue__number\x03: $issue__title \x0313$issue__html_url__tiny\x03"
config plugins.GitHub.format.issues "echo \"[\x0310$repository__name\x03]\"