Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ $# -gt 0 ]
then
for url in "$@"
do
echo "Processing $url ..."
files=$(wget -q -O- $url | grep -o '<enclosure [^>]*url="[^"]*' | grep -o '[^"]*$')
while IFS= read -r file; do
#!/bin/bash
for f in "$@"
do
echo "Processing $f file..."
ffmpeg -i "$f" -af aformat=s16:44100 "${f%.*}".flac
done
#!/bin/bash
for f in "$@"
do
echo "Processing $f file..."
ffmpeg -i "$f" -codec:a libmp3lame -q:a 0 -map_metadata 0:s:0 -id3v2_version 3 -write_id3v1 1 "${f%.*}".mp3
#ffmpeg -i "$f" -codec:a libmp3lame -q:a 0 "${f%.*}".mp3
done
@fiskhandlarn
fiskhandlarn / gist:41d1b622616820412699d7fac6f1f1f6
Created March 3, 2020 18:59
Doomtrooper // Vinnarleken SM
5 Adrenalinkick
5 Feltolkning
5 Gömt Förråd
5 Positiv Karma
5 Ynkrygg
5 Stridsutmattning
5 Negativ Karma
3 Gravplundring
3 Stulna Dokument
1 Utökade möjligheter
@fiskhandlarn
fiskhandlarn / classic-editor.php
Last active April 8, 2019 11:15 — forked from toshotosho/gist:109ec080dcffbb711be4d0f0db99d5f5
Dequeue Gutenberg block library (with support for mu-plugins)
<?php
declare(strict_types=1);
if (!defined('ABSPATH')) {
exit();
}
add_action('wp_enqueue_scripts', function () {
// bail if classic editor setting is set to block or no-replace
@fiskhandlarn
fiskhandlarn / custom-search-acf-wordpress.php
Last active April 17, 2024 06:52 — forked from jserrao/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request. I updated this original script with better documentation and XSS / SQL injection support.
<?php
/*
##############################
########### Search ###########
##############################
Included are steps to help make this script easier for other to follow
All you have to do is add custom ACF post types into Step 1 and custom taxonomies into Step 10
I also updated this work to include XSS and SQL injection projection
[list_searcheable_acf list all the custom fields we want to include in our search query]