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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
SourceFile = %A_ScriptDir%\shortcuts.ahk | |
DestFile = %A_Startup%\shortcuts.ahk | |
FileCopy, %SourceFile%, %DestFile%, true | |
Run, %A_Startup% |
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/zsh | |
arch_name="$(uname -m)" | |
if [ "${arch_name}" = "x86_64" ]; then | |
if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then | |
echo "Running on Rosetta 2" | |
else | |
echo "Running on native Intel" | |
fi |
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
#include <iostream> | |
#include <cairo/cairo.h> | |
#include <cairo/cairo-quartz.h> | |
int main(int argc, const char * argv[]) { | |
cairo_surface_t *surface = cairo_quartz_surface_create(CAIRO_FORMAT_RGB24, 320 * 3.0, 560 * 3.0); | |
cairo_t *cr = cairo_create(surface); | |
cairo_set_antialias(cr, CAIRO_ANTIALIAS_BEST); |
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
# https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new | |
ffmpeg -c:v h264_cuvid -i "input.flv" -c:v h264_nvenc "output.mp4" | |
# add srt | |
ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4 | |
ffmpeg -i infile.mkv -i infile.srt -c copy -c:s srt outfile.mkv | |
# resize | |
ffmpeg -i input.avi -filter:v scale=720:-1 -c:a copy output.mkv | |
ffmpeg -c:a ac3 -c:v hevc_cuvid -i "input.ts" -filter:v scale=-1:1080 -c:a aac -c:v hevc_nvenc "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
{ | |
"title": "Custom shortcut", | |
"maintainer": "ly", | |
"rules": [ | |
{ | |
"description": "format code in xcode", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { |
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
// ==UserScript== | |
// @name v2ex_comment | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description simplify comment cell. | |
// @author 6david9 | |
// @match https://*.v2ex.com/t/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com | |
// @require https://code.jquery.com/jquery-3.6.3.min.js | |
// @grant none |
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
// ==UserScript== | |
// @name v2ex | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description remove background image. | |
// @author 6david9 | |
// @match https://*.v2ex.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com | |
// @grant none | |
// @run-at document-idle |
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
// ==UserScript== | |
// @name v2ex_cell | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description simplify timeline cell. | |
// @author 6david9 | |
// @match https://*.v2ex.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com | |
// @require https://code.jquery.com/jquery-3.6.3.min.js | |
// @run-at document-idle |
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 | |
if ! command -v ffmpeg &> /dev/null | |
then | |
echo "ffmpeg could not be found" | |
echo "installing ffmpeg" | |
apt install ffmpeg -y | |
fi | |
if ! command -v whisper &> /dev/null |
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
payload: | |
- '+.openai.com' | |
- '+.sentry.io' | |
- '+.oaistatic.com' | |
- '+.livekit.cloud' | |
- '+.oaiusercontent.com' | |
- '+.ai.com' | |
- '+.openai.com.cdn.cloudflare.net' | |
- 'openaiapi-site.azureedge.net' | |
- 'openaicom-api-bdcpf8c6d2e9atf6.z01.azurefd.net' |