- Store artist names to multi line text variable.
export list="$(ls *.mp3 | awk '{split($0,a," - "); print a[1]}' | uniq)"
{ | |
customize: function (xlsx) { | |
let sheet = xlsx.xl.worksheets['sheet1.xml']; | |
let numrows = 0; | |
let total = 0; | |
const valueColumnOrder = 7; // nth-child, start with 1 | |
const totalColumnOrder = 'G'; // spreadsheet column letter, G == 7 | |
const totalLabel = 'Total'; | |
const shouldReplaceCommas = true; |
youtube-dl --get-id "$PLAYLIST_URL" | xargs -I '{}' -P 5 youtube-dl 'https://youtube.com/watch?v={}' |
function randomColors(count) { | |
const colors = ['#071E22', '#1D7874', '#679289', '#F4C095', '#EE2E31', '#423E3B', '#FF2E00', '#FEA82F', '#FFFECB', '#5448C8']; | |
const selected = []; | |
for (var i = count - 1; i >= 0; i--) { | |
selected.push(colors[ Math.floor(Math.random()*colors.length) ]); | |
} | |
return selected; |
-- Reference: https://stackoverflow.com/questions/36647058/removing-duplicates-with-unique-index | |
ALTER IGNORE TABLE mytable ADD UNIQUE INDEX myindex (A, B, C, D); |
#!/usr/bin/node | |
/** | |
* Copyright 2020 Akın Özgen <[email protected]> | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom | |
* the Software is furnished to do so, subject to the following conditions: |
function _g() { | |
vars = {}; | |
(window.location.href.split('?').length>1?window.location.href.split('?')[1]:'').split('&').forEach(_ => { | |
p=_.split('='); | |
vars[`${p[0]}`]=p[1].split(',').length>1?p[1].split(','):p[1]; | |
}); | |
return vars; | |
} |
#!/bin/bash | |
directory="$(find -L ~ -type d -not -path '*/\.*' -not -path '*/Android/*' -maxdepth 5 | dmenu -i -l 10 -p 'Where do you want to save the file? Only absolute path...')" | |
query="$(echo '' | dmenu -i -p 'Search for Artist - Song name format')" | |
provider="$(echo -e 'Youtube\nSpotify' | dmenu -i -l 2 -p 'Select provider')" | |
cd $directory | |
if [ "$provider" = "Spotify" ] | |
then |
#!/bin/bash | |
selected="$(find ~/Music/*/*.mp3 | dmenu -i -l 15 -fn 'SF Mono' -fn monospace-14)" | |
option="$(echo -e 'Play\nQueue' | dmenu -i -l 2 -fn 'SF Mono' -fn monospace-14)" | |
if [ "$option" = "Play" ] | |
then | |
deadbeef "$selected" & | |
elif [ "$option" = "Queue" ] | |
then |
a: white | |
g: black | |
t: blue | |
c: red | |
------------------------------------------------------------------- | |
1 attaaaggtt tataccttcc caggtaacaa accaaccaac tttcgatctc ttgtagatct | |
61 gttctctaaa cgaactttaa aatctgtgtg gctgtcactc ggctgcatgc ttagtgcact | |
121 cacgcagtat aattaataac taattactgt cgttgacagg acacgagtaa ctcgtctatc | |
181 ttctgcaggc tgcttacggt ttcgtccgtg ttgcagccga tcatcagcac atctaggttt |