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
function rt --description "Record a Twitch stream to a specified file." | |
set -l app "streamlink" | |
# Ensure the app is installed | |
if not command -v $app > /dev/null | |
echo (set_color red)"Error: '$app' is not installed."(set_color normal) | |
switch $app | |
case "streamlink" | |
if command -v brew > /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
# | |
# Remark: | |
# The USERNAME, HOST, PORT, SSH_KEY_PATH variables must be filled in before use | |
# | |
# Usage: | |
# - wifi Guest status | |
# - wifi Guest on | |
# - wifi Guest off | |
# - wifi Guest toggle | |
# - wifi Guest |
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://man7.org/linux/man-pages/man1/tmux.1.html | |
# Common | |
set -g base-index 1 | |
set -g mode-keys vi | |
set -g mouse on | |
set -g pane-base-index 1 | |
set -g status off | |
set -g status-interval 0 |
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
function sendToTelegram -d "Send a message or document to a telegram chat" | |
# | |
# Description: This script allows you to send text messages or files (images, | |
# videos, audio, or documents) to a Telegram chat using a Telegram bot. | |
# Ensure you set the TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID environment variables. | |
# For more information on creating a Telegram bot, visit: https://t.me/BotFather | |
# | |
# Note: Maximum file size allowed is 50 MB. | |
# | |
# Usage: |
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
@echo off | |
rem After triggered, repeat every 10 minutes indefinitely | |
schtasks /create /tn "My task name" /tr "wscript.exe C:\task.vbs" /sc minute /mo 10 |
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
on run {input} | |
if (count of input) > 0 then | |
set {filePath, fileName} to getPathAndName from input | |
set cmdCd to "cd " & quoted form of filePath | |
set cmdNvim to "nvim " & quoted form of fileName | |
tell application "iTerm" | |
if exists window 1 then | |
tell current window | |
create tab with default profile |
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
"$schema"="https://starship.rs/config-schema.json" | |
format = """ | |
$python\ | |
$username\ | |
$hostname\ | |
$directory\ | |
$git_branch\ | |
$git_commit\ | |
$git_state\ |
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
:: Batch Script: FileRenamer.bat | |
:: | |
:: Description: | |
:: This batch script renames files in a specified directory based on a user-defined template. | |
:: It allows customization of the renaming process by providing options for directory, | |
:: template, file pattern, delimiter, and starting index. | |
:: | |
:: Usage: | |
:: FileRenamer.bat [-d <directory>] [-t <template>] [-p <pattern>] [-del <delimiter>] [-i <index>] | |
:: |
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
@echo off | |
setlocal | |
for /f "tokens=2 delims=:" %%a in ('systeminfo ^| find "Available Physical Memory"') do set "avail_mem=%%a" | |
if %errorlevel% neq 0 ( | |
echo Error: Failed to get available physical memory | |
) else ( | |
echo Available memory: %avail_mem% | |
) |
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/osascript | |
# Dependency: requires iTerm (https://iterm2.com) | |
# Install via Homebrew: `brew install --cask iterm2` | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Open Vim | |
# @raycast.mode compact |
NewerOlder