Skip to content

Instantly share code, notes, and snippets.

@crystian
crystian / activate.bat
Last active November 15, 2024 01:13
ComfyUI automate installation scripts
call settings.bat
rem for default folder of python
rem python -m ensurepip --default-pip
%PYTHON% -m venv %VENV_DIR%
call %VENV_DIR%\Scripts\activate.bat
rem manual: e:\AI\SD\comfyUI\.env\Scripts\activate.bat
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@computerquip
computerquip / ut2004-key-gen.py
Last active November 15, 2024 01:08
UT2004 Key Generator Bottle App
from bottle import default_app, route
import hashlib
import ctypes
import secrets
# Copyright (c) 2005-2023, NumPy Developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@baidu8
baidu8 / 桃乃木 - 种子
Last active May 11, 2022 07:41
桃乃木 - 种子
[magnet:?xt=urn:btih:32cf0961f061f1d206a5b6d00dbd29b7d5d3d4aa&dn=HD-ipx-176](magnet:?xt=urn:btih:32cf0961f061f1d206a5b6d00dbd29b7d5d3d4aa&dn=HD-ipx-176)
[magnet:?xt=urn:btih:367479465ae9509444a157b33564f390ce33af15&dn=HD-ipx-158](magnet:?xt=urn:btih:367479465ae9509444a157b33564f390ce33af15&dn=HD-ipx-158)
[magnet:?xt=urn:btih:d5e542c8f836a28ffb88d63f9d608fe9b2f9830d&dn=ipx-143](magnet:?xt=urn:btih:d5e542c8f836a28ffb88d63f9d608fe9b2f9830d&dn=ipx-143)
[magnet:?xt=urn:btih:0ac1789ae231424aeb477e97d132f2c1c026aa20&dn=ipx-129](magnet:?xt=urn:btih:0ac1789ae231424aeb477e97d132f2c1c026aa20&dn=ipx-129)
[magnet:?xt=urn:btih:7c654e00e4cca0841e73f2cb942239b11b91166b&dn=ipx-114](magnet:?xt=urn:btih:7c654e00e4cca0841e73f2cb942239b11b91166b&dn=ipx-114)
[magnet:?xt=urn:btih:0d5950cc886186fefd7e42d0685f920c86126149&dn=ipx-099](magnet:?xt=urn:btih:0d5950cc886186fefd7e42d0685f920c86126149&dn=ipx-099)
[magnet:?xt=urn:btih:bd6f6877232942ff6c6d8ea41dbd9be49529b9f4&dn=1080P-ipx-086](magnet:?xt=urn:btih:bd6f6877232942ff6c6d8ea41dbd9b
@the-spyke
the-spyke / pipewire.md
Last active November 15, 2024 01:05
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@James-Ansley
James-Ansley / pi5_fan_controller.py
Last active November 15, 2024 01:02
Raspberry Pi 5 Auto Fan Controller
from enum import Enum
import time
TEMP_PATH = "/sys/devices/virtual/thermal/thermal_zone0/temp"
FAN_PATH = "/sys/class/thermal/cooling_device0/cur_state"
class FanSpeed(Enum):
OFF = 0
LOW = 1
@virattt
virattt / hedge-fund-agent-team-v1-3.ipynb
Last active November 15, 2024 01:01
hedge-fund-agent-team-v1-3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Klerith
Klerith / app.html
Created November 22, 2022 19:07
Lista de tareas - Vanilla JavaScript
<section class="todoapp">
<header class="header">
<h1>Tareas</h1>
<input id="new-todo-input" class="new-todo" placeholder="¿Qué necesita ser hecho?" autofocus>
</header>
<!-- This section should be hidden by default and shown when there are todos -->
<section class="main">
<input id="toggle-all" class="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
@khskekec
khskekec / libre-link-up-http-dump.md
Last active November 15, 2024 00:58
HTTP dump of Libre Link Up used in combination with FreeStyle Libre 3
@JamesCullum
JamesCullum / immich-docker-config.md
Last active November 15, 2024 00:57
docker-compose.yml for immich with WAF, DDoS protection, image resizing and without port forwarding

Setup Immich via Docker Compose with WAF, CDN, DDoS protection, no port forwarding and automated image resizing

In this guide, we are using the docker compose setup that is recommended by the Immich team. Once everything is configured and running in your local network, we can expand on it.

The first recommended step is to use Cloudflare Tunnel to make your local instance globally available. This is free and you benefit from the native DDoS protection, WAF and CDN from Cloudflare. The cloudflared daemon basically makes an outgoing connection to Cloudflare and makes the designed interfaces available on the internet, without granting access to undesired parts of the network.

Start off by creating a Cloudflare account, going into the "Zero Trust" portion of the account and add a new tunnel.