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 | |
if [ "$#" -lt 2 ]; then | |
echo "Usage: $0 <input_file> <output_file> [target_size_MB]" | |
exit 1 | |
fi | |
input="$1" | |
output="$2" | |
target_size=${3:-20} # Default to 20MB if not specified |
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 | |
# ANSi art function | |
function ANSi() { | |
tr '\0' ' ' < "$1" | iconv -f CP437 -t UTF8 | |
} | |
# Check if a directory was provided | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 directory" |
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 | |
base_url="https://files.artpacks.org" | |
index_page="/" | |
# Function to process a URL | |
process_url() { | |
local url=$1 | |
if [[ $url =~ \.zip$ ]]; then # if it's a zip file | |
wget "${base_url}${url}" |
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
# /etc/acpi/events/asus-keyboard-backlight-up | |
# This is called when the user presses the key brightness | |
# up button and calls /etc/acpi/asus-keyboard-backlight.sh for | |
# further processing. | |
# sudo ln -s /path/to/file /etc/acpi/events/asus-brightness-down | |
event=video/brightnessdown BRTDN 00000087 00000000 | |
action=/etc/acpi/asus-brightness.sh |
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/sh | |
set -e | |
if [ -z "$1" ] || ! [ "$1" -eq "$1" ] 2>/dev/null; then | |
echo "Invalid or missing argument. Please provide a valid number." | |
exit 1 | |
fi | |
if sudo rm -rf /opt/Discord; then | |
echo "Removed old Discord installation." | |
else | |
echo "Failed to remove old Discord installation. Aborting." |
This file has been truncated, but you can view the full file.
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
00000000: 4e45 531a 2000 e310 0000 0000 0000 0000 NES. ........... | |
00000010: 0e44 4444 4444 4444 4444 4444 4444 4444 .DDDDDDDDDDDDDDD | |
00000020: 4444 4444 4444 4444 4444 4444 4444 4444 DDDDDDDDDDDDDDDD | |
00000030: 4444 4444 4444 4444 4444 4444 4444 4444 DDDDDDDDDDDDDDDD | |
00000040: 4444 4444 4444 4444 4444 4444 4444 4444 DDDDDDDDDDDDDDDD | |
00000050: 0c2a 4444 4444 4444 4444 0000 4444 4428 .*DDDDDDDD..DDD( | |
00000060: 0644 4442 4440 4444 4440 4444 4400 2e44 .DDBD@[email protected] | |
00000070: 4444 0824 422e 4444 4444 4000 0204 0c00 DD.$B.DDDD@..... | |
00000080: 2444 4444 2044 2844 4444 2a28 2a44 4444 $DDD D(DDD*(*DDD | |
00000090: 4444 4444 4444 4244 2a44 442e 2c44 4444 DDDDDDBD*DD.,DDD |
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
#download playlist | |
youtube-dl -x --audio-format=mp3 -ciw -o "%(title)s.%(ext)s" -v https://www.youtube.com/playlist\?list\=PL06diOotXAJLAAHBY7kIUm5GQwm2ZinOz --add-metadata --write-description | |
#sed ranged pattern string in a for loop | |
for i in *.description; do sed '1,/► Music Credit:/d;/––– ♪♫/,$d' "$i" > "$i%.description"_parsed.description; done | |
#remove original .description files | |
rm -rf *.description | |
#rename _parsed |
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
function makeid() { | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
for (var i = 0; i < 12; i++) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} |
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
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/addons/p5.dom.min.js"></script> | |
<script type="text/javascript"> | |
var possibleChoice = ["rock","paper","scissor"]; | |
var currentSelection; | |
var playerOneScore = 0; | |
var playerTwoScore = 0; | |
var c; |