Skip to content

Instantly share code, notes, and snippets.

@lucaspar
lucaspar / nvenc-install.sh
Last active April 25, 2024 07:01
Installation script of CUDA-accelerated `ffmpeg` with NVIDIA Encoder
#!/bin/bash
# =========================================================================
# Source: https://gist.github.com/lucaspar/27f5e108b80524b315be10b2a9049817
# =========================================================================
# This script will compile and install a static FFmpeg build with
# support for NVENC in Ubuntu. Developed in Ubuntu 23.10,
# with NVIDIA Drivers v535.129.03 and CUDA v12.2 with a GPU
# with CUDA capability 8.6 (RTX 3080) (see ccap below).
# It assumes NVIDA drivers are installed and that you have a
# CUDA-compatible GPU. You can check installed drivers with:
@jidckii
jidckii / alertmanager.tmpl
Created April 5, 2023 14:08
Alertmanager telegram template
{{ define "__yucca_text_alert_list" }}{{ range . }}
---
๐Ÿชช <b>{{ .Labels.alertname }}</b>
{{- if .Annotations.summary }}
๐Ÿ“ {{ .Annotations.summary }}{{ end }}
{{- if .Annotations.description }}
๐Ÿ“– {{ .Annotations.description }}{{ end }}
๐Ÿท Labels:
{{ range .Labels.SortedPairs }} <i>{{ .Name }}</i>: <code>{{ .Value }}</code>
{{ end }}{{ end }}
@AshtakaOOf
AshtakaOOf / gui.md
Last active April 25, 2024 07:00
Stable Diffusion GUI list

Stable Diffusion GUIs list

This will help me and hopefully other to get everything going and generate waifus images with Stable Diffusion, and maybe other txt2img things maybe.

I will probably add shields.io to make it more easier to read (maybe)

Tip

Check out the SD Anime Checkpoints list.

  • Glossary
@eeropic
eeropic / paste-svg-from-clipboard-paper.js
Last active April 25, 2024 06:58
Paste SVG to Paper.js from clipboard
//CC2018
document.addEventListener('paste', function(evt) {
//Import SVG copied to clipboard from Illustrator
//remove last hidden character that will otherwise break the import
if(document.activeElement.nodeName!="TEXTAREA"){
var str=evt.clipboardData.getData('text/plain').slice(0, -1);
var svg=project.importSVG(str)
svg.clipped=false;
svg.children[0].remove()
svg.parent.insertChildren(svg.index,svg.removeChildren());
@gagarine
gagarine / win11-mouse-scroll-reverse.md
Last active April 25, 2024 06:54
Reverse Mouse Wheel scroll in Windows 11 (Natural Mode like MacOS)

Reverse Mouse Wheel scroll in Windows 11

Chose between natural mode like MacOS or Windows default mode.

Step 1: Open Windows PowerShell in Administrator Mode.

You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.

Step 2: Copy the following code and paste it in the command line of Windows PowerShell:

$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
@nafiesl
nafiesl / how_to_get_telegram_chat_id.md
Created December 20, 2023 11:49
How to get Telegram Bot Chat ID

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created February 27, 2017 07:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@planetWayne
planetWayne / ReadME.rst
Last active April 25, 2024 06:45
Quick and Dirty walkthrough for setting up Enterprise WiFi on Unifi on Windows domain

Walk-through to setup Enterprise Wifi with Unifi on Windows Server =================================================================

Update 14/02/2024 : Added step 3-d - allowing the cert template to be issued by a CA

Why

Quite simply, you will have the ability to log on to your Company Wifi network using your Windows Domain Username and Password. No more remembering someone else's idea of a secure password. A Single Sign-on for all resources.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 25, 2024 06:45
ๅ›ฝๅ†…็š„ Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ๏ผŒ็”ฑๅ›ฝๅ†…ๆ•™่‚ฒๆœบๆž„ไธŽๅ„ๅคงไบ‘ๆœๅŠกๅ•†ๆไพ›็š„้•œๅƒๅŠ ้€ŸๆœๅŠก | Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ

ๅ›ฝๅ†…ไปŽ Docker Hub ๆ‹‰ๅ–้•œๅƒๆœ‰ๆ—ถไผš้‡ๅˆฐๅ›ฐ้šพ๏ผŒๆญคๆ—ถๅฏไปฅ้…็ฝฎ้•œๅƒๅŠ ้€Ÿๅ™จใ€‚Docker ๅฎ˜ๆ–นๅ’Œๅ›ฝๅ†…ๅพˆๅคšไบ‘ๆœๅŠกๅ•†้ƒฝๆไพ›ไบ†ๅ›ฝๅ†…ๅŠ ้€Ÿๅ™จๆœๅŠกใ€‚

Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

้…็ฝฎๅŠ ้€Ÿๅœฐๅ€

Ubuntu 16.04+ใ€Debian 8+ใ€CentOS 7+

@dnlvgl
dnlvgl / 90-kensington-expert-trackball-remap.hwdb
Created January 25, 2020 23:03
Remapping Kensington Expert Trackball Buttons with wayland
# Button remap for Kensington Expert Trackball
# both upper buttons (90003 + 90004) act as BTN_LEFT (272)
# both lower buttons (90001 + 90002) act as BTN_RIGHT (273)
# save this file under '/etc/udev/hwdb.d/90-kensington-expert-trackball-remap.hwdb'
# run `sudo systemd-hwdb update` and reboot
#
# source: https://askubuntu.com/questions/1145057/remapping-mouse-buttons-to-keyboard-keys
# /sys/class/input/event20/device/id/bustype:0003
# /sys/class/input/event20/device/id/product:1020
# /sys/class/input/event20/device/id/vendor:047d