Code Monkey home page Code Monkey logo

bashscripts's Introduction

HopeSeekr's Bash Scripts

Utilities to ease your life.

Scripts that I use on a daily basis, or on new system installs, that improve my experience with Linux substantially!

bash_rc.aliases

This is arguably the most important piece of the project!

These dozens of aliases make working with Linux and developing web app software much more efficient and streamlined.

Go check it out! bash_rc.aliases

changelog-maker-lite

Easily creates CHANGELOGs based upon concise git commit logs:

[2020-10-01 00:23:15 CDT] - [x265.sh] Use VAAPI for encoding using Intel graphics cards.
[2020-10-01 00:30:00 CDT] - Created a README.md.
[2020-10-01 00:37:07 CDT] - [random-file] renamed for more clarity.
[2020-10-01 00:44:34 CDT] - Flushed out the README.
[2020-10-01 00:49:44 CDT] - [bash_rc.aliases] Added a whole slew of webdev aliases.
[2020-10-01 00:58:00 CDT] - [bash_rc.aliases] Added some more descriptions.
[2020-10-01 01:10:26 CDT] - [.gitconfig] Added a whole bunch of my git aliases. tag: v1.0.0
[2020-10-01 08:17:42 CDT] - [clear-cache] Delete broken symlinks in the ~/.cache directories.

gitconfig

Install into ~/.gitconfig.

git pretty
git ll

Shows a beautiful multi-colored log with standard ISO dates:

git pretty

git fix

Quickly jumps into rebasing the last two commits into one another.

git alterego

Quickly switch the current repo to using your main alterego account for an previously-committed commit.

git ego

The reverse of git alterego.

git resign <hash>

Quickly resign bulk commits from to the latest.

This is particularly utilitarian when your GPG key expires and you need to renew it and then resign.

git c: checkout
git cp: cherry-pick
git cpm: cherry-pick for Merge commits

Utility aliases to make git more efficient to use.

git shows

Shows the GPG signature for every commit in git log.

sudoers.d/00_prompt_once

This will make sudo only ask for your password ONE TIME during a single boot. It won't ask across terminals and it won't time out. On reboot, it will automatically expire.

cron.daily/00_clear-cache

  • Empties out the ~/.cache directory of every non-root user.
  • Empties out Pacman's package cache directory.

This can optionally use nullfsvfs in order to limit wear-and-tear on SSDs.

cron.daily/01_purge-locales

Removes every non-EN locale file every day.

This saves, usually, 400-1000 MB of space.

cron.hourly/btrfs-snapshot

Takes BTRFS snapshots of / every hour on the hour.

cron.daily/btrfs-snapshot

Cleans up the prior day's hourly snapshots while keeping the daily ones.

clone-github-repos.php

Automagically downloads all of the GitHub repositories of a user or or an organization.

init-btrfs-rootfs

The Problem

Arch Linux sticks all of / in the main BTRFS subvolume (ID=5).

This means that common snapshotting and subvolume tasks, particularly rolling back to a previously (e.g., working) root subvolume is exceptionally difficult and requires a rescue boot, etc.

The Solution

The provided solution hotfixes the situation, hopefully without the need for a rescue disk, on a live environment. However, you really ought to have a rescue disk prepped in avance.

And for the love of God, make backups first!

btrfs-init-rootfs

ls-by-min

Returns a list of files sorted by file size, descending, that are at least X MB big.

random-file [dir]

Picks a random file in a directory / PWD.

sync-watch

Displays how many megabytes still need to be written to [slow] disks.

watermark.sh

Adds a watermark to videos via ffmpeg.

x265.sh

Transcodes to x265 HEVC via ffmpeg using Intel's graphics card.

bashscripts's People

Contributors

hopeseekr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.