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
import java.util.BitSet; | |
import java.security.SecureRandom; | |
public class UUIDv4 { | |
private static final boolean[] VERSION = new boolean[] { | |
false, true, false, false // Version 4 | |
}; | |
private static final boolean[] VARIANT = new boolean[] { | |
true, false // Variant |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
int decimal; | |
int *sequence = NULL; | |
int size = 0; | |
printf("Enter a decimal number: "); | |
scanf("%d", &decimal); |
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
# This file maps Internet media types to unique file extension(s). | |
# Although created for httpd, this file is used by many software systems | |
# and has been placed in the public domain for unlimited redisribution. | |
# | |
# The table below contains both registered and (common) unregistered types. | |
# A type that has no unique extension can be ignored -- they are listed | |
# here to guide configurations toward known types and to make it easier to | |
# identify "new" types. File extensions are also commonly used to indicate | |
# content languages and encodings, so choose them carefully. | |
# |
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
"C:\Program Files\qemu\qemu-system-x86_64.exe" -smp 1 -m 512M -nographic ^ | |
-hda "V:\VirtualMachines\qemuImages\LinuxDev1\linuxdev1.qcow2" ^ | |
-nic user,hostfwd=tcp::8888-:22,hostfwd=tcp::8080-:9090 | |
pause |
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
// ==UserScript== | |
// @name Redirect from shorts page | |
// @namespace Violentmonkey Scripts | |
// @match https://www.youtube.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 26/6/2022, 1:22:39 AM | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Removes Recommended Channels | |
// @namespace Violentmonkey Scripts | |
// @match https://www.twitch.tv/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 26/6/2021, 1:22:39 AM | |
// ==/UserScript== |
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
#!/bin/bash | |
INDEX=0 | |
find . -type f | while read FILE; do | |
BASENAME=$(basename "$FILE") | |
EXTENSION="${BASENAME##*.}" | |
FILENAME="${BASENAME%.*}" | |
echo "$FILENAME.$EXTENSION -> $INDEX.$EXTENSION" |
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
#!/bin/bash | |
LIMIT_W=300 | |
LIMIT_H=300 | |
find . -name '*.jpg' -o -name '*.png' -o -name '*.jpeg' | while read FILE; do | |
BASENAME=$(basename "$FILE") | |
IDENTIFY=$(identify "$BASENAME") | |
[[ "$IDENTIFY" =~ ([0-9]+)+x([0-9]+) ]] |
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
/** | |
* | |
* npm install @google-cloud/translate srt-parser-2 yargs | |
* | |
* ====== | |
* Usage: | |
* ====== | |
* | |
* node translateSrt.js \ | |
* --key 'google-cloud-project-key.json' \ |
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
#!/bin/bash | |
# ======================================================================== # | |
# Downloads a YouTube video with all the subtitles packed into a .mkv file # | |
# ======================================================================== # | |
# Usage: ./ytdl-subs.sh "YOUTUBE_URL" "OUTPUT_NAME_WITHOUT_EXTENSION" | |
UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) |
NewerOlder