Skip to content

Instantly share code, notes, and snippets.

View toby3d's full-sized avatar
👋
I'm leaving GitHub. Find me elsewhere!

Maxim Lebedev toby3d

👋
I'm leaving GitHub. Find me elsewhere!
View GitHub Profile
@toby3d
toby3d / Caddyfile
Created May 2, 2022 21:10
Adapting Nginx configuration of PeerTube for Caddy
{
servers :433 {
timeouts {
read_body 30s
read_header 10s
write 10s
idle 10s
}
protocol {
experimental_http3
@toby3d
toby3d / remove-lastfm-duplicates.md
Created February 12, 2020 11:42
Removes duplicates scrobblings in your last.fm library

Remove last.fm duplicates

  1. Select all code below and move this script on your bookmarks tab, rename it as you want:
javascript:(function(){var found = 0; var num = 5; var sections = Array.from(document.getElementsByTagName('tbody'));  function replaceQueryParam(param, newval, search) { var regex = new RegExp('([?;&])' + param + '[^&;]*[;&]?'); var query = search.replace(regex, '$1').replace(/&$/, ''); return (query.length > 2 ? query + '&' : '?') + (newval ? param + '=' + newval : ''); };   function gup( name, url ) { if (!url) url = location.href; name = name.replace(/[\[]/,'\\\[').replace(/[\]]/,'\\\]'); var regexS = '[\\?&]'+name+'=([^&#]*)';%20var%20regex%20=%20new%20RegExp(%20regexS%20);%20var%20results%20=%20regex.exec(%20url%20);%20return%20results%20==%20null%20?%20null%20:%20results[1];%20};%20%20sections.forEach(function%20(section)%20{%20var%20els%20=%20Array.from(section.rows);%20var%20names%20=%20els.map(function%20(el)%20{%20var%20nmEl%20=%20el.querySelector('.chartlist-name')

Keybase proof

I hereby claim:

  • I am toby3d on github.
  • I am toby3d (https://keybase.io/toby3d) on keybase.
  • I have a public key ASAtYDIjNAxB61We5uako-gyvIhYMhZFuJrynF_r6Jg2vQo

To claim this, I am signing this object: