This file contains hidden or 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 | |
| # Description: | |
| # Use this script to compair cache sizes before you manually reboot or clear the caches. | |
| # This script displays cache sizes for various directories, including VS Code and user/system caches. | |
| # It helps identify large cache directories, particularly in the user's Library/Caches folder. | |
| # | |
| # Usage: | |
| # ./cache-sizes.sh - Shows VS Code and system cache sizes, skips detailed user cache scan. | |
| # ./cache-sizes.sh --all - Shows VS Code, system, and detailed user cache sizes, including top large directories. | |
| # ./cache-sizes.sh -a - Same as --all (shorthand). |
This file contains hidden or 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 | |
| # Get the pg_dump file for a given project database and streams it back locally. | |
| # Saves locally to: $OUTDIR/$filename | |
| # | |
| # Description: This script performs a backup of the specified project's database | |
| # using PostgreSQL's pg_dump utility. It can operate in two modes: | |
| # 1. With a specified project name as an argument (Optional) | |
| # 2. Default: Using the PROJECT environment variable | |
| # | |
| # Options: |
This file contains hidden or 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
| /* SWEEEET RAINBOW STRIPES BACKGROUND */ | |
| background: repeating-linear-gradient( | |
| 135deg, | |
| #d50000, | |
| #d50000 20px, | |
| #c51162 20px, | |
| #c51162 40px, | |
| #aa00ff 40px, | |
| #aa00ff 60px, | |
| #6200ea 60px, |
This file contains hidden or 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 pytz | |
| ''' | |
| timezones not in AREA/CITY format dont take into concideration the local daylight savings | |
| so if a user specifies GMT as timezone then it is fixed thoughout the year! | |
| get a reduced list timezone names from pytz.all_timezones that have a AREA/CITY format | |
| ''' | |
| def area_timezones(): | |
| timezones = set() | |
| for zone in pytz.all_timezones_set: | |
| parts = zone.split('/') |
This file contains hidden or 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 python3 | |
| import socket | |
| import subprocess | |
| import ipaddress | |
| alive = [] | |
| def get_ip(): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| s.settimeout(0) |
This file contains hidden or 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
| /*** | |
| * after sleep, ubuntu 20.04 drops down to 1280:1024 ? unable to choose higher resolution from settings. | |
| * create and set new resolution with script | |
| * @see: https://unix.stackexchange.com/questions/227876/how-to-set-custom-resolution-using-xrandr-when-the-resolution-is-not-available-i | |
| **/ | |
| # see current list of output options: | |
| $ xrandr | |
| # read settings for given resolution |
This file contains hidden or 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
| # speed app debug on actual device | |
| install `scrcpy` to use your mouse and keyboard on your android device (developer mode) | |
| https://github.com/Genymobile/scrcpy | |
| Creates a window on your linux desktop that show what your phone screen "sees". | |
| Host keyboard, mouse and clipboard availble on device. | |
| Can be linked by usb or ethernet (in docs) | |
| # install | |
| sudo apt install scrcpy |
This file contains hidden or 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 | |
| toilet -f roman -F crop:border $USER | lolcat |
This file contains hidden or 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
| $ docker-compose rm -vf && \ | |
| docker-compose pull && \ | |
| docker-compose build --no-cache && \ | |
| docker-compose up --force-recreate --always-recreate-dep | |
| ```bash | |
| docker-compose rm -vf && docker-compose pull && docker-compose build --no-cache && docker-compose up --force-recreate --always-recreate-dep | |
| ``` |
This file contains hidden or 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
| ```bash | |
| ip address | egrep "^\s+link" | awk '{$1=$1};1' | cut -d' ' -f2 | tail -n+2 | |
| ``` |
NewerOlder