Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / huawei switch cheat sheet
Last active March 14, 2025 06:44
huawei switch cheat sheet
------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------
#Enter the system view mode
<Quidway>sys
Enter system view, return user view with Ctrl+Z.
------------------------------------------------------------------------------------------------------------------------------
#Enter the system view mode
@PierBover
PierBover / index.md
Last active March 14, 2025 06:43
Reading waveform data in ffmpeg

Reading waveform data in ffmpeg

When working on an audio player, I wanted to extract the audio waveform data to paint the audio waveform dynamically in the browser on a <canvas> element.

Initially I used the bbc/audiowaveform package but this proved problematic for a number of reasons. First I wasn't able to install that package (or build the binary) in macOS for local dev. The other big issue is that I was only able to figure out how to install it on Ubuntu, so I couldn't use it in Alpine (for Docker images) or other environments like cloud functions.

Initial approach

I found out from these docs it's possible to paint a waveform with ffmpeg by extracting raw audio data:

@X-Raym
X-Raym / DaVinci Resolve Scripting Doc.txt
Last active March 14, 2025 06:41
DaVinci Resolve Scripting API Doc v19.1
Last Updated: 28 October 2024
-----------------------------
In this package, you will find a brief introduction to the Scripting API for DaVinci Resolve Studio. Apart from this README.txt file, this package contains folders containing the basic import
modules for scripting access (DaVinciResolve.py) and some representative examples.
From v16.2.0 onwards, the nodeIndex parameters accepted by SetLUT() and SetCDL() are 1-based instead of 0-based, i.e. 1 <= nodeIndex <= total number of nodes.
Overview
--------
As with Blackmagic Fusion scripts, user scripts written in Lua and Python programming languages are supported. By default, scripts can be invoked from the Console window in the Fusion page,
@UbuntuEvangelist
UbuntuEvangelist / How To Install CMake 3.22 Ubuntu 22.04
Last active March 14, 2025 06:39
Install CMake 3.22 Ubuntu 22.04
sudo apt update
sudo apt install build-essential
sudo apt install libssl-dev
export OPENSSL_ROOT_DIR=/usr/include/openssl
wget https://cmake.org/files/v3.29/cmake-3.29.2.tar.gz
tar -xzvf cmake-3.29.2.tar.gz
cd cmake-3.29.2
./bootstrap
make -j$(nproc)
sudo make install
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active March 14, 2025 06:39
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@b0gdanw
b0gdanw / Disable-Sequoia-Bloatware.sh
Last active March 14, 2025 06:31
Disable Sequoia Bloatware
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@jlia0
jlia0 / agent loop
Last active March 14, 2025 06:26
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@mingfeima
mingfeima / part_3_vectorization_techniques.md
Last active March 14, 2025 06:25
PyTorch CPU Performance Optimization Tutorial - Section III
@JuanDiegoMontoya
JuanDiegoMontoya / opengl_resource_indexing.md
Last active February 26, 2025 21:23
How to do bindless in OpenGL without blowing your legs off.

The Definitive Guide to Non-Uniform Resource Indexing in OpenGL

Code

For those short on time:

#extension GL_NV_gpu_shader5 : enable
#extension GL_EXT_nonuniform_qualifier : enable

#ifdef GL_EXT_nonuniform_qualifier
#define NonUniformIndex(x) nonuniformEXT(x)