Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title LLM | |
# @raycast.mode fullOutput | |
# Optional parameters: | |
# @raycast.icon 🤖 | |
# @raycast.argument1 { "type": "text", "placeholder": "Prompt" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory | |
brew install portaudio | |
brew install git-lfs | |
git lfs install | |
git clone https://github.com/myshell-ai/OpenVoice | |
cd OpenVoice | |
git clone https://huggingface.co/myshell-ai/OpenVoice | |
cp -r OpenVoice/* . | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* class_addIvar | |
* Adds a new instance variable to a class. | |
* | |
* BOOL class_addIvar(Class cls, const char *name, size_t size, uint8_t alignment, const char *types) | |
* | |
* Return Value | |
* YES if the instance variable was added successfully, otherwise NO. | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns a range-limited number {n} between {min} and {max} | |
// @param {number} n - Current Value | |
// @param {number} min - Minimum Value | |
// @param {number} max - Maximum Value | |
// @returns {number} | |
export const clamp = (n, min, max) => | |
Math.min(Math.max(n, min), max) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]: | |
General capabilities: dr1 delay hardware | |
Threading capabilities: none | |
Supported hardware devices: cuda cuda d3d11va d3d11va | |
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 bgra rgb0 rgba x2rgb10le x2bgr10le gbrp gbrp16le cuda d3d11 | |
hevc_nvenc AVOptions: | |
-preset <int> E..V....... Set the encoding preset (from 0 to 18) (default p4) | |
default 0 E..V....... | |
slow 1 E..V....... hq 2 passes | |
medium 2 E..V....... hq 1 pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eXtreme Go Horse (XGH) Process | |
Source: http://gohorseprocess.wordpress.com | |
1. I think therefore it's not XGH. | |
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster. | |
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster. | |
XGH is faster than any development process you know (see Axiom 14). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Reads AirTag data from the FindMy.app cache and converts it to a daily GPX file | |
# | |
# Rsyncs the data to a web accessible folder that can be displayed with e.g. | |
# https://gist.github.com/henrik242/84ad80dd2170385fe819df1d40224cc4 | |
# | |
# This should typically be run as a cron job | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is a sample .curlrc file | |
# https://everything.curl.dev/ is a GREAT RESOURCE | |
# store the trace in curl_trace.txt file. beware that multiple executions of the curl command will overwrite this file | |
--trace curl_trace.txt | |
# store the header info in curl_headers.txt file. beware that multiple executions of the curl command will overwrite this file | |
--dump-header curl_headers.txt | |
#change the below referrer URL or comment it out entirely |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Executar comandos a seguir para atualizar os pacotes | |
sudo apt update -y | |
sudo apt upgrade -y | |
# Só o Python | |
sudo apt install python3.10-full python3.10-dev -y | |
# Instalar pacotes a seguir |
NewerOlder