Skip to content

Instantly share code, notes, and snippets.

@linuxkathirvel
linuxkathirvel / print-scr-key-to-flameshot-tool-in-gnome3.md
Last active April 18, 2024 03:35
How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

  1. Goto Keyboard settings and click 'Save a screenshot to Pictures' under 'Screenshots' section.
  2. Press 'Backspace' key delete 'PrtScr' key shortcut and press 'Set' button
  3. Press '+'(Plust) icon in the 'Custom Shortcuts' in the same window
  4. Enter 'Flameshot' in 'Name' field , 'flameshot gui' in 'Command' field, and click 'Set Shortcut' button and press 'PrtScr' button in the keyboard and close the dialog box 5.That's it. If you press 'PrtScr' key, the Flameshot selection area screen will appear.
@xaliander
xaliander / NVIDIA_Driver_Update.md
Last active April 18, 2024 03:34
How to update your NVIDIA driver for CUDA on Ubuntu v20.04.2

Installing CUDA

Warning: Today's date is April 14th 2021, and therefore these instructions might no longer be applicable for you!

Too Long Didn't Read (TLDR): Getting the error message below after installing CUDA? Download the .run file and follow the non (optional) code snippets to update your NVIDIA driver.

I started off by installing Ubuntu and afterwards I PRECISELY followed these installation instructions from NVIDIA on how install CUDA. I recommend you do the same.

@Spottedleaf
Spottedleaf / Starlight 1.20.md
Last active April 18, 2024 03:29
The future of the Starlight mod

Final change of plans (March 8, 2024)

I don't see that many people are using Starlight on modern versions anymore. As such, I don't see any reason to continue to maintain the mod versions, given that they do have real mod conflict issues with other mods. Starlight is also not neccessary to use on 1.20.x anyways.

Starlight may make a return in a future project of mine, but for now I am ceasing to upload new mod versions and commit updates to the github. If you want Starlight on the server, you will need to use Paper or one of its derivatives.

function create_edge_TTS({ timeout = 10, auto_reconnect = true } = {}) {
const TRUSTED_CLIENT_TOKEN = "6A5AA1D4EAFF4E9FB37E23D68491D6F4";
const VOICES_URL = `https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list?trustedclienttoken=${TRUSTED_CLIENT_TOKEN}`;
const SYNTH_URL = `wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=${TRUSTED_CLIENT_TOKEN}`;
const BINARY_DELIM = "Path:audio\r\n";
const VOICE_LANG_REGEX = /\w{2}-\w{2}/;
let _outputFormat = "audio-24khz-48kbitrate-mono-mp3";
let _voiceLocale = 'zh-CN',
@christophemarois
christophemarois / use-map.tsx
Last active April 18, 2024 03:24
React hook for state using ES6 Map
import { useState } from 'react'
export default function useMap<K, V>(): [
Map<K, V>,
{
set: (key: K, value: V) => void
unset: (key: K) => void
clear: () => void
}
] {
@manugarri
manugarri / README.rst
Created May 11, 2016 12:25 — forked from livibetter/README.rst
Frequency spectrum of sound using PyAudio, NumPy, and Matplotlib

This Gist is about how I use PyAudio, NumPy, and Matplotlib to plot freqency spectrum of system sound or microphone.

You can read this blog post for more detail or watch this video:

@imba-tjd
imba-tjd / .Cloud.md
Last active April 18, 2024 03:22
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@ahmadrosid
ahmadrosid / write-fixer.py
Created April 17, 2024 10:02
Fixed typos, spelling mistakes, and grammar while maintaining clarity and a concise tone using Claude.
import sys
import anthropic
from dotenv import load_dotenv
load_dotenv()
client = anthropic.Anthropic()
prompt_template = """
Please review and edit the following text to ensure it is grammatically correct, clear, and concise. Aim to maintain a casual tone without being overly informal. Provide suggestions for improvement and explain any changes you make. Do not add double quotes in you rewrite answer. Answer in direct response.
@vanushwashere
vanushwashere / README.md
Last active April 18, 2024 03:14
Systemd unit file for supervisord service

Systemd unit file for supervisord service

  • place this config in /etc/systemd/system/supervisord.service
  • kill all supervisord processes
  • sudo systemctl daemon-reload
  • sudo systemctl enable supervisord
  • start with sudo systemctl start supervisord if already not started
@Jim-Bar
Jim-Bar / YUV_formats.md
Last active April 18, 2024 03:14
About YUV formats

About YUV formats

First of all: YUV pixel formats and Recommended 8-Bit YUV Formats for Video Rendering. Chromium's source code contains good documentation about those formats too: chromium/src/media/base/video_types.h and chromium/src/media/base/video_frame.cc (search for RequiresEvenSizeAllocation(), NumPlanes() and those kinds of functions).

YUV?

You can think of an image as a superposition of several planes (or layers in a more natural language). YUV formats have three planes: Y, U, and V.

Y is the luma plane, and can be seen as the image as grayscale. U and V are reffered to as the chroma planes, which are basically the colours. All the YUV formats have these three planes, and differ by the different orderings of them.