Skip to content

Instantly share code, notes, and snippets.

View 5E7EN's full-sized avatar
:electron:

Simon 5E7EN

:electron:
  • Planet Earth
View GitHub Profile
@5E7EN
5E7EN / ChatGPT Character Limit Checker.ps1
Created February 21, 2024 21:36
Simple powershell script to check if the text contained in a file is within the limits for ChatGPT prompt. Supports -Truncate flag to optionally fit the text.
param (
[string]$FilePath, # Path to the text file
[int]$Limit = 4096, # Default limit set to 4096 characters
[switch]$Truncate # Switch to indicate if truncation should be performed
)
function Get-FileContent {
param (
[string]$Path
)
@5E7EN
5E7EN / create-timelapse.py
Last active August 18, 2023 07:15
Creates a timelapse video from a folder of videos by extracting every Nth frame from each video, using ffmpeg.
import os
import subprocess
import time
# Constants
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
VIDEOS_PATH = os.path.join(DIR_PATH, 'videos')
INPUT_VIDEOS_DIRECTORY = os.path.join(VIDEOS_PATH, 'input')
OUTPUT_FRAMES_DIRECTORY = os.path.join(VIDEOS_PATH, 'frames')
OUTPUT_VIDEOS_DIRECTORY = os.path.join(VIDEOS_PATH, 'output')
@5E7EN
5E7EN / download-ring-videos.py
Last active August 18, 2023 06:59 — forked from pmac/ring-videos-download.py
Download all the videos between two events from Ring
import json
import getpass
import time
import requests
import logging
from pathlib import Path
from pprint import pprint
# https://github.com/tchellomello/python-ring-doorbell
from ring_doorbell import Ring, Auth, RingStickUpCam
@5E7EN
5E7EN / WhatsApp-Android-iPhone-Migration.md
Last active February 29, 2024 00:24
Migrate WhatsApp messages from an unrooted Android device to an iPhone - without a physical Mac (Windows 10).

Migrate WhatsApp from Android to iPhone (without root)

Description

After working around the clock searching for a way to migrate WhatsApp messages from Android to my brand-spankin' old iPhone X, coming across countless articles explaining that it was virtual impossible - especially without access to a Mac device, I thankfully came across a solution, and only felt it necessary to share.
I have tested this method using a Moto G Fast (Android 11), iPhone X (iOS 14.6), and Windows 10 PC.

Important Notes:

  • Media files and shared locations will not be imported/migrated. They will be shown instead as placeholders.
@5E7EN
5E7EN / Connect to Remote Hyper-V Host.md
Created April 1, 2021 06:55
How to connect to a remote Hyper-V host over the internet - without domain/LAN

Connect to Remote Hyper-V Host (over the internet - without domain/LAN)

  1. Setup Ubuntu Server for OpenVPN (AWS) -
    • Install via https://github.com/Nyr/openvpn-install. Be sure to run bash script as root.
    • Download OpenVPN Connect Client on computer1 and connect to VPN using generated .ovpn configuration file
    • To create another .ovpn client config (for second computer), run bash script once again but this time select option #1 (Add a new client)
    • Download OpenVPN Connect Client on computer2 and connect to VPN using generated .ovpn configuration file
    • Edit /etc/openvpn/server/server.conf and append client-to-client to end of file
    • Restart OpenVPN service (sudo service openvpn restart)
@5E7EN
5E7EN / SimonSaysBot - Chess Module.md
Last active June 8, 2020 02:31
Help information regarding the `Chess` module for the Twitch chat bot "SimonSaysBot".

SimonSaysBot Chess Module - Help

NOTE: Active games will produce extensive chat clutter! Enable module at your own risk. (Working on perhaps converting the multi-line responses to just an ASCII board representation. Coming soon™)

*chess

  • newgame <opponent>
    Sends an invite to the provided opponent to play a game of Chess to which they should use *chess accept to start. Command will fail if user is not in chat or after 20 seconds of no response. Once accepted, your side (black or white) will be chosen randomly.

  • accept

Text to Speech For Pepegas
*Only tested with Brian voice*
Testing your message
You can use the following website which emulates TTS:
https://5e7en.me/tts
Cheering vs Donations