Skip to content

Instantly share code, notes, and snippets.

View dantheman213's full-sized avatar
๐Ÿš€

Dan dantheman213

๐Ÿš€
View GitHub Profile

How To List Local Network Devices Cross Platform

Windows

arp -a
@dantheman213
dantheman213 / GetPrimaryNetworkAdapters.cs
Last active January 13, 2024 10:15
Get primary network adapter(s) info for C#
using System;
using System.Linq;
using System.Net.NetworkInformation;
using System.Net.Sockets;
namespace GetPrimaryNetworkDeviceInfoExample
{
public class Program
{
public static void Main()
@dantheman213
dantheman213 / hyperv_on.ps1
Created March 14, 2020 06:08
Enable Hyper-V on Windows 10
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
@dantheman213
dantheman213 / hyperv_on.ps1
Created March 14, 2020 06:08
Enable Hyper-V on Windows 10
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
@dantheman213
dantheman213 / readme.txt
Created March 22, 2020 23:54
recommended video settings for best streaming
1080p and below
Container = MP4
Video = h.264
Audio = AC3 / ACC
4K
Container = MP4
Video = h.265
Audio AC3
@dantheman213
dantheman213 / generate_iso_from_files.sh
Created April 16, 2020 00:22
Generate an ISO using a docker container
INPUT_FILES_WITHIN_DIR=/home \
OUTPUT_DIR=/mnt/c/Users/danie/Desktop/output \
OUTPUT_FILE_NAME=file.iso \
ISO_LABEL=LABEL \
docker run --rm -w /iso -v $INPUT_FILES_WITHIN_DIR:/iso -v $OUTPUT_DIR:/output genisoimage -v -J -V $ISO_LABEL -o /output/$OUTPUT_FILE_NAME .
@dantheman213
dantheman213 / video_detect_commercial_break.sh
Created April 21, 2020 00:36
Detect all the commercial breaks points in a given TV show video file
ffmpeg -i "file.mp4" -vf "blackdetect=d=1:pix_th=0.00" -an -f null - 2>&1 | grep blackdetect
@dantheman213
dantheman213 / bst.go
Created April 21, 2020 20:40
Golang binary tree
package main
import "fmt"
type Node struct {
Left, Right *Node
Value int64
}
type BinarySearchTree struct {
@dantheman213
dantheman213 / ffmpeg.md
Last active April 23, 2024 18:10
ffmpeg cheatsheet

ffmpeg cheatsheet

Extract video at 30 seconds in and the duration with be 5 seconds

ffmpeg -ss 00:00:30 -i orginalfile -t 00:00:05 -vcodec copy -acodec copy newfile

Add a watermark logo to the bottom right of the video offset by 30 x 30 from corner

echo "username ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers