Skip to content

Instantly share code, notes, and snippets.

@keeferrourke
keeferrourke / flac2opus
Last active February 26, 2024 19:26
This is a script to convert all flac files in a given directory to ogg/opus. I wrote this because mp3 kinda sucks and opus is a free format that is pretty much taking over the internet.
#!/bin/bash
# Copyright 2017 Keefer Rourke <mail@krourke.org>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCNUMBERLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@jynik
jynik / cpu_performance.sh
Created April 1, 2014 04:18
Set all CPU frequency scaling governors to 'performance'
#!/bin/sh
#
# Set frequency scaling governer to 'performance' on all cores
set -e
GOVERNOR=performance
SYS_PATH=/sys/devices/system/cpu
for cpu in `ls $SYS_PATH | grep 'cpu[0-9]\+'`; do
CPU_SCALING_GOVERNOR=$SYS_PATH/$cpu/cpufreq/scaling_governor
current=`cat $CPU_SCALING_GOVERNOR`
echo "$cpu is currently '$current', setting to 'performance'"