Code Monkey home page Code Monkey logo

dotfiles's Introduction

Some dotfiles

Snippets

Add mp3gain to all mp3 files in the current directory and child directories, treating every directory as an album:

find -mindepth 2 -type f -iname '*.mp3' | sed 's,/[^/]*$,,' | sort | uniq| while read -r dir ; do echo mp3gain -p "$dir"/*.[Mm][Pp]3 ; done

Add replaygain to all flac files in the current directory and child directories, treating every directory as an album. if at least one replaygain tag is set in one of the files, the entire directory is skipped. Also do things in parallel:

gain_dir() {
    [[ -n "$(metaflac --show-tag=REPLAYGAIN_TRACK_GAIN "$1"/*.[Ff][Ll][Aa][Cc])" ]] && return 0
    echo metaflac --add-replay-gain --preserve-modtime "$1"/*.[Ff][Ll][Aa][Cc]
}
export -f gain_dir
find -mindepth 2 -type f -iname '*.flac' | sed 's,/[^/]*$,,' | sort | uniq| parallel gain_dir '{}'

route ipv4 from one network to the other

sudo iptables -t nat -A POSTROUTING -o enp0s25 -j MASQUERADE
sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'

Plus an appropriate /etc/dhcpd.conf.

Printer packages: Epson Stylus SX340

  • from the arch repos: iscan iscan-data sane
  • from the aur: epson-inkjet-printer-escpr

Move partition to another host

ssh oldhost dd bs=4M if=/dev/partition | pv -s 500G | dd bs=4M of=/dev/partition

dotfiles's People

Contributors

hpdeifel avatar t-wissmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotfiles's Issues

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.