Skip to content

Instantly share code, notes, and snippets.

View asmattic's full-sized avatar

Matt Oldfield asmattic

View GitHub Profile
@asmattic
asmattic / clean_up_node_modules.sh
Created April 4, 2025 12:58
Recursively removes all node modules directories within a given directory
#!/bin/bash
echo -e "\nFind and optionally delete all top level node_modules in a specific directory.\n"
# Initialize an array to store paths
NODE_MODULES_PATHS=()
while IFS= read -r line; do
size=$(echo "$line" | awk '{print $1}')
path=$(echo "$line" | awk '{print $2}')
@asmattic
asmattic / webp-thumbnail-support.sh
Created December 3, 2021 22:57
Add webp thumbnail preview support in ubuntu file manager
# Add the 3rd party PPA
sudo add-apt-repository ppa:krifa75/eog-ordissimo
# Update package cache and install library
sudo apt update && sudo apt install webp-pixbuf-loader
# remove the Ubuntu PPA, because it also contains the variant
# of eog (Eye of GNOME, GNOME’s default image viewer) that
# might break your other packages
sudo add-apt-repository --remove ppa:krifa75/eog-ordissimo
@asmattic
asmattic / gmf-2021-css-updates.css
Last active September 16, 2021 06:36
GMF-2021-css-updates
/** Entry header */
.site-content .entry-header .entry-title {
text-align: left;
}
.entry-title {
margin: 0 0 0 10px;
}
/** fil up more of page */
@asmattic
asmattic / ubuntu-not-detecting-second-display.sh
Last active March 22, 2021 19:52
Ubuntu 20.04 Not detecting second display
sudo apt install snapd && sudo snap install snap-store && sudo reboot
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/coverage/**": true,
"**/node_modules/*/**": true,
"**/server/data/**": true,
"**/dist/**": true,
"**/modules/**": true,
"**/info_gathering/**": true,
@asmattic
asmattic / free-up-space-on-linux-root-partition.sh
Last active February 15, 2021 01:13
Free up space on Linux root partition
# Check disk usage by journal
journalctl --disk-usage
# Mark current journal files as archived so they are no longer being written to
sudo journalctl --rotate
# Delete journal logs older than X days
sudo journalctl --vacuum-time=1day
# Delete log files until the disk space taken falls below the specified size
@asmattic
asmattic / add-exfat-filesystem-support-to-linux.sh
Last active January 4, 2021 09:46
Add exFat Filesystem support to Linux
# Add support for more packages
sudo add-apt-repository universe
# Add support for even more packages
sudo add-apt-repository multiverse
sudo apt update
# Add support for exfat filesystem
@asmattic
asmattic / honeywhatmusic-few-suggestions.md
Last active January 2, 2021 07:31
honeywhatmusic-few-suggestions.md

Couple corrections to CSS that would help

Expecially with being able to click the social media links

/* logo move down */
#comp-jil0j6h5 {
 display: block;
@asmattic
asmattic / prune-all-node-modules.sh
Created December 31, 2020 07:46
Delete node_modules in all nested folders
sudo find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@asmattic
asmattic / Setup Ubuntu 20.04 for Resolve Video Software 17.md
Created December 27, 2020 21:42
Setup Ubuntu 20.04 for Resolve Video Software 17