This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## The device used to store the share data a.k.a. userdata. | |
## INTERNAL -> Use the same drive Batocera has been flashed to. See https://wiki.batocera.org/add_games_bios on how to add files to the internal storage. | |
## ANYEXTERNAL -> Use the first external storage detected. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive | |
## Putting the name here of the drive instead will use that specific external storage. Use the menu in Batocera to see the available options. | |
## DEVICES -> Use external storage for individual folders. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#manual_configuration_with_batocera-bootconf_advanced | |
## DEV -> Manually define the GUID of the storage device requested. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#dev_mode | |
## NETWORK -> Use the network share, requires configuration first. See https://wiki.batocera.org/store_games_on_a_nas | |
sharedevice=NETWORK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- a function that calculates the length of a rope -} | |
length :: Rope -> Int | |
length (Leaf s) = length s | |
length (Node l r) = length l + length r | |
{- a function that calculates the height of a rope -} | |
height :: Rope -> Int | |
height (Leaf s) = 1 | |
height (Node l r) = 1 + max (height l) (height r) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# local dev machine, Archlinux, all good | |
$ perl -MTime::Local=timelocal_posix -E '' | |
$ perl -v | |
This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux-thread-multi | |
# Debian 11, server | |
$ perl -MTime::Local=timelocal_posix -E '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for myplugin in ['yankmatches.vim', 'currentline.vim', 'cccp.vim', 'LS_COLORS.vim'] | |
let path = expand("%:~") | |
" developing, use dev version of plugin | |
if path =~ '\vdev[/]' . myplugin | |
echo 'match!' | |
let project_dir = fnamemodify(path, ":h:h") | |
Plug project_dir | |
" use stable version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" display a visual aid when lining long things up | |
" disable colorcolumn entirely if | |
" - cursor is in the first column | |
" - cursor is in the same column that &colorcolumn is set to | |
function! ColorColumnAtCursorPositionToggle() | |
let column = col('.') | |
if exists(&colorcolumn) || column == 1 || column == &colorcolumn | |
set colorcolumn& | |
else | |
let &colorcolumn = column |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[130]-(3481)-~ | |
% mpc search comments knarkmacka | |
"comments" is not a valid search type: <any|Artist|Album|AlbumArtist|Title|Track|Name|Genre|Date|Composer|Performer|Comment|Disc|MUSICBRAINZ_ARTISTID|MUSICBRAINZ_ALBUMID|MUSICBRAINZ_ALBUMARTISTID|MUSICBRAINZ_TRACKID|MUSICBRAINZ_RELEASETRACKID|OriginalDate|ArtistSort|AlbumArtistSort|AlbumSort|Label|MUSICBRAINZ_WORKID|Grouping|Work|Conductor> | |
MPD error: already in command list mode | |
[1]-(3482)-~ | |
% mpc search comment knarkmacka | |
(3483)-~ | |
% while read d; do tree --noreport $d; done <<(beet ls comments:KNARKMACKA|dirnamep|sort -u) | |
/mnt/music8/+TAGGED/I/Idde Schultz/Idde Schultz β1995β Idde Schultz [CD, FLAC] | |
βββ 01 I Min Famn.flac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget $(for x in $(curl -s https://amigaremix.com/remixes/{1..35} | grep -o '/listen/.+[.]mp3'|perl -pe 's|^|http://amigaremix.com|'|perl -pe 's/ /%20/g'); do echo $x; done) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# vim: ft=perl:fdm=marker:fmr=#<,#>:fen:et:sw=2: | |
# abstract: delete $file with a suffix if $file with other suffix exists | |
use strict; | |
use warnings FATAL => 'all'; | |
use vars qw($VERSION); | |
use autodie qw(:all); | |
use utf8; | |
use open qw(:std :utf8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# beet import -sAW --set artist="$ARTIST" *(.) "$@" | |
# artist tag is always specified | |
paths: | |
singleton: %upper{%left{$artist,1}}/$artist/+tracks/$base_name | |
item_fields: | |
base_name: | | |
import os.path | |
base = os.path.basename(path) | |
return os.path.splitext(base)[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
last = "!git log -10 HEAD --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[m \\033[32m%s\\033[m %-.40s \\033[30;1m%s\\033[m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1β¦\",\"g\",$3), $4, $5 }';" | |
lastt = "!git log -76 HEAD --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[m \\033[32m%s\\033[m %-.40s \\033[30;1m%s\\033[m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1β¦\",\"g\",$3), $4, $5 }';" |