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
#!/usr/bin/env bash | |
dig any +multiline +noall +answer $1 |
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 | |
f=0 | |
d=100 | |
o="output" | |
n="" | |
function throwhelp(){ | |
printf "Usage:\n-f frames\n-n input filename\n-o output filename\n-d duration\n*** All the input files must be .webp format ***\n" | |
} |
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
const log = (x) => { | |
console.log(x); | |
}; | |
const list = [ | |
[1, 0], | |
[0, 1], | |
[1, 1], | |
[0, 0] | |
]; | |
const operations = [{ |
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
// hide navbar on scroll down and show it on scroll up | |
const navbar_autohide = () => { | |
let navbar = document.getElementById("top_nav"); | |
let last_scroll = 0; | |
window.addEventListener("scroll", function() { | |
let scroll = window.scrollY; | |
if (last_scroll > 0 && scroll > last_scroll) { | |
navbar.style.transform = "translateY(-400%)"; | |
} else { | |
navbar.removeAttribute("style"); |
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
// Plays the video and on the end of the video changes slide | |
// if there isnt a video shows next slide instead | |
let timeout = null; | |
function start_end(target, slider) { | |
if (target) { | |
target.play(); | |
target.addEventListener("ended", () => { | |
slider.next(); | |
}); | |
} else { |
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
#!/usr/bin/env python | |
import os | |
import sys | |
# Sets prefix location | |
ROOT_PREFIX_LOC = "/.wine" | |
# In order to pass our own options | |
# without affecting anything | |
# right now or in future | |
# we separate the path | |
# of the actual prefix |
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
#!/usr/bin/env python | |
import os | |
import sys | |
import shutil | |
PROTON_PREFIX = "" | |
PROTON_PATH = "" | |
def ifError(target, msg, code): |
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 | |
find_proton(){ | |
# Search for proton file in mnt and Users Home | |
# Searching for proton folder will have more issues | |
# since custom proton folders have different names and slashes | |
# This is the best solution that came to my mind... | |
# also ignore all the unreadable folders errors | |
proton=$(find /mnt $HOME -type f -name proton 2>/dev/null) | |
# Force IFS on line break | |
IFS=$'\n' |
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 | |
# This script requires xdotool, imagemagick | |
# This should get the active windows name | |
ACTIVE_NAME=$(xdotool getactivewindow getwindowname) | |
# Timestamp is used as the screenshot's name | |
# Way better than numbering in my opinion | |
TIMESTAMP=$(date +"%s") | |
# In case of empty active_name | |
# Just to play it safe use UNTITLED | |
if [[ -z "$ACTIVE_NAME" ]];then |
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 | |
################################################################ | |
# Requires xorg-xwininfo xdotool ffmpeg gawk | |
################################################################ | |
# Where to store the video | |
loc="$HOME/Videos" | |
if [ -d "$1" ]; then | |
loc="$1" | |
fi | |
# All the xwininfo output from active window |
NewerOlder