Skip to content

Instantly share code, notes, and snippets.

View jms1989's full-sized avatar

Michael SanAngelo jms1989

View GitHub Profile
@jms1989
jms1989 / compress.desktop
Created March 11, 2023 22:24
desktop files for compressing to 7zip and decompressing various filetypes.
[Desktop Entry]
Type=Service
Icon=ark
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;
Actions=compress;
Encoding=UTF-8
[Desktop Action compress]
Name=Compress Directory into 7zip
@jms1989
jms1989 / docker-compose.yml
Created June 9, 2020 17:32
docker compose file for plex and friends
---
version: "3"
services:
plex:
image: linuxserver/plex
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1000
x="$1" ; unrar x "$x"
@jms1989
jms1989 / file-count.sh
Created July 13, 2019 23:14
count files
#!/bin/bash
du -a "$1" | cut -d/ -f2 | sort | uniq -c | sort -n
exit
@jms1989
jms1989 / count-images.sh
Created July 13, 2019 23:14
Count images in current folder
find . -type f | sed -e 's/.*\.//' | sort | uniq -c | sort -n | grep -Ei '(tiff|bmp|jpeg|jpg|JPG|png|gif)$'
@jms1989
jms1989 / count-extensions.sh
Created July 13, 2019 23:12
count extensions
find "$1" -type f | sed -e 's/.*\.//' | sort | uniq -c
@jms1989
jms1989 / convert.sh
Created July 13, 2019 23:11
compress folder and contents into 7z
x="$1" ; 7z a -mx0 "$x".7z "$x"; rm -r "$x";
@echo off
if exist "C:\Program Files\Oracle\VirtualBox" set path="%path%;C:\Program Files\Oracle\VirtualBox"
set file=%1
set /A size=%2
echo Converting VMDK to VDI
VBoxManage clonemedium "%file%.vmdk" "%file%.vdi" --format vdi
echo Resizing Image
VBoxManage modifymedium "%file%.vdi" --resize %size%
if exist "%file%_resized.vmdk" (
#!/bin/bash
# SOURCE: https://unix.stackexchange.com/revisions/463214/4
#
# Compare two directories using rsync and print the differences
# CAUTION: options MUST appear after the directories
#
# SYNTAX
#---------
# diff-dirs Left_Dir Right_Dir [options]
#
gistup