Skip to content

Instantly share code, notes, and snippets.

View ThatOneCodeDev's full-sized avatar
🛰️
Configuring SATCOM equipment...

Reaper ThatOneCodeDev

🛰️
Configuring SATCOM equipment...
View GitHub Profile
@wenchy
wenchy / Makefile
Last active January 16, 2024 15:36
Compile all .cpp files into one target under the current directory.
CC := g++
CFLAGS := -Wall -g
TARGET := test
# $(wildcard *.cpp /xxx/xxx/*.cpp): get all .cpp files from the current directory and dir "/xxx/xxx/"
SRCS := $(wildcard *.cpp)
# $(patsubst %.cpp,%.o,$(SRCS)): substitute all ".cpp" file name strings to ".o" file name strings
OBJS := $(patsubst %.cpp,%.o,$(SRCS))
all: $(TARGET)
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active July 9, 2024 09:52
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@mtvee
mtvee / main.cpp
Last active September 19, 2023 07:22
cross platform socket example c/c++
#include<cstdio>
#include<cstring>
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include<unistd.h>
@EvieePy
EvieePy / music.py
Last active July 22, 2024 16:49
Basic music with playlist support on Rewrite
"""
Please understand Music bots are complex, and that even this basic example can be daunting to a beginner.
For this reason it's highly advised you familiarize yourself with discord.py, python and asyncio, BEFORE
you attempt to write a music bot.
This example makes use of: Python 3.6
For a more basic voice example please read:
https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_voice.py
@howCodeORG
howCodeORG / key-generator.py
Created May 22, 2018 01:28
howCode's simple key generation script in Python.
import random
class Key:
def __init__(self, key=''):
if key == '':
self.key= self.generate()
else:
self.key = key.lower()
@Quahu
Quahu / purge.cs
Created June 2, 2018 16:52
An example purge command that removes messages from the channel it's used in.
[Command("purge")]
[Alias("clean")]
[Summary("Downloads and removes X messages from the current channel.")]
[RequireUserPermission(ChannelPermission.ManageMessages)]
[RequireBotPermission(ChannelPermission.ManageMessages)]
public async Task PurgeAsync(int amount)
{
// Check if the amount provided by the user is positive.
if (amount <= 0)
{
@denizssch
denizssch / XpSerials.txt
Created July 21, 2019 00:13
Windows XP ALL Serial Keys :) (For testing purpose [Ex: VM or PenTest])
FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8
Windows XP PRO Corporate serial number S/N: Key: MQPWW-PGVKX-YPMKG-8DH3G-KC8PW
windows xp home edition serial number S/N: 034634-262024-171505-828316-729010-413531-800424-400442
Windows XP 64 serial number S/N: B2RBK-7KPT9-4JP6X-QQFWM-PJD6G
Windows XP serial number S/N: K6C2K-KY62K-DQR84-RD4QV-QB74Q
Windows XP Professional 64-bit Corporate Edition 5.2.3790.1830 serial number S/N: VCFQD-V9FX9-46WVH-K3CD4-4J3JM
Microsoft Windows XP Professional SP2 serial number S/N: YY8F2-3CKVQ-RKTRG-6JMDR-9DTG6
Windows XP Professional Service Pack 1 sp1 serial number S/N: F46YY - 2R8VQ - R8GMY - 926VK - 6BQ73
Windows XP Pro serial number S/N: KBWR7-76BD8-J7MDQ-KKG&C-V9Q2J
@ultim8k
ultim8k / uuid.sh
Created October 10, 2019 09:32
Generate UUID in BASH/ZSH
### Source: https://coderwall.com/p/t_sz3q/generate-uuid-at-shell-prompt
# alias uuid="python -c 'import sys,uuid; sys.stdout.write(str(uuid.uuid4()))' | pbcopy && pbpaste && echo"
alias uuid="uuidgen | tr -d '\n' | tr '[:upper:]' '[:lower:]' | pbcopy && pbpaste && echo"