This file contains hidden or 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
# Ensure the script runs as administrator | |
$CurrentUser = [Security.Principal.WindowsIdentity]::GetCurrent() | |
$Principal = New-Object Security.Principal.WindowsPrincipal($CurrentUser) | |
$IsAdmin = $Principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
if (-not $IsAdmin) { | |
Write-Host "Restarting with administrator privileges..." | |
Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs | |
exit | |
} |
This file contains hidden or 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
# Path to FFmpeg executable | |
$FFmpegPath = "Path\To\ffmpeg.exe" | |
# Path to the folder containing video files | |
$InputFolder = "Path\To\InputFolder" | |
# Path to the output folder for MP3 files | |
$OutputFolder = "Path\To\OutputFolder" | |
# Ensure the output folder exists | |
if (-not (Test-Path -Path $OutputFolder)) { |
This file contains hidden or 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
# Define the GitHub API URL for yt-dlp releases | |
$repoUrl = "https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest" | |
# Enter your GitHub token here (to avoid rate limits) | |
$githubToken = "your_personal_access_token_here" | |
# Function to check and update yt-dlp | |
function Update-ytDlp { | |
# Send a web request to get the latest release data from GitHub | |
$response = Invoke-RestMethod -Uri $repoUrl -Headers @{ |
This file contains hidden or 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 | |
MONGO_CONTAINER_NAME="mongo" # Or use the actual container name | |
# Variables | |
BOT_TOKEN="<your bot token>" | |
CHAT_ID="<chatId>" | |
FILE_PATH="/mongodb_backups/waitlist_backup.archive" # Path where the archive will be stored on the host machine | |
FILE_PREFIX="part_" # Prefix for the split parts | |
PART_SIZE="49M" # Size of each part (49 MB to stay within Telegram bot limit) | |
# Dynamically get the container ID |
This file contains hidden or 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
- name: send telegram message on push | |
if: success() || failure() | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
status:${{ job.status }} | |
${{ github.actor }} created commit: |
This file contains hidden or 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
using System; | |
using MailKit.Net.Smtp; | |
using MailKit.Security; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Logging; | |
using MimeKit; | |
using MimeKit.Cryptography; | |
namespace MailerApi.Services | |
{ |
This file contains hidden or 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
cookies = Object.fromEntries(document.cookie.split('; ').map(c => c.split('='))); | |
let UDID = cookies.UDID; | |
let jwt = cookies[['jwt-access_token']]; | |
// let jwt = JSON.parse(window.localStorage.JWT).access_token; | |
var myHeaders = new Headers(); | |
myHeaders.append("authority", "snappfood.ir"); | |
myHeaders.append("accept", "application/json, text/plain, */*"); | |
myHeaders.append("accept-language", "en-US,en;q=0.9,fa;q=0.8"); | |
myHeaders.append("authorization", "Bearer " + jwt); |