Skip to content

Instantly share code, notes, and snippets.

@fbmoose48
fbmoose48 / mp3all128k.sh
Created December 30, 2022 05:44
mp3all128k
#!/bin/bash
for file in *.mp3; do lame -b 128 "$file"; done
@fbmoose48
fbmoose48 / wav2mp3.sh
Last active December 30, 2022 05:41
wav2mp3
#!/bin/bash
for file in *.wav; do lame -b 128 "$file"; done
@fbmoose48
fbmoose48 / amdgpu_compute_mode_linux.php
Created July 4, 2019 05:06 — forked from divinity76/ubu_1804_amdgpu_compute_mode_linux.php
sets "compute mode" on AMD GPU's in linux
#!/usr/bin/env php
<?php
declare(strict_types = 1);
if (posix_geteuid () !== 0) {
die ( "error: this script requires root privileges, re-run it as root." );
}
$amdgpu_dir = '/sys/bus/pci/drivers/amdgpu';
$dirs = array_filter ( array_map ( 'trim', glob ( $amdgpu_dir.DIRECTORY_SEPARATOR.'*', GLOB_NOSORT | GLOB_ONLYDIR | GLOB_MARK ) ), function (string $str) {
return (is_writable ( $str."power_dpm_force_performance_level" ) && is_writable ( $str.'pp_compute_power_profile' ));
} );