Skip to content

Instantly share code, notes, and snippets.

View adiologydev's full-sized avatar
🎶
Listening to Music

Aditya Tripathi adiologydev

🎶
Listening to Music
View GitHub Profile
@TheOnlyWayUp
TheOnlyWayUp / README.md
Last active May 28, 2025 21:07
Like all songs in a Youtube Music Playlist

This script likes all the songs in a Youtube Music Playlist at once.

How to use:

  • Visit a Playlist's page on ytm (URL looks like: https://music.youtube.com/playlist?list=...
  • Press ctrl + shift + j. This opens the Developer Console.
  • Copy the script in this gist (That's in script.js)
  • Paste the code into the Developer Console on the ytm Tab, hit enter.
  • Great, you're done!

Star ⭐ this gist if it was useful. Follows to my GitHub Profile are appreciated.

@MrPunyapal
MrPunyapal / BelongsToTeam.php
Last active March 20, 2025 07:02
Enhance Laravel Access Control with 'BelongsToTeam' Trait: Simplify Team-Based Permissions
<?php
namespace App\Traits\Models;
use App\Models\Team;
use Illuminate\Database\Eloquent\Builder;
trait BelongsToTeam
{
// This method is executed when a new model is being created.
@MaximilianKohler
MaximilianKohler / Listmonk-tutorial.md
Last active May 15, 2025 15:48
Complete Listmonk setup guide. Step-by-step tutorial for installation and all basic functions. Amazon EC2 & SES

Listmonk setup and usage guide

When I first set up Listmonk it was to use with Amazon SES. At the time Amazon would give you free 62,000 emails/mo if you sent them from an EC2 instance. So EC2 was the best server to use. In mid 2023 Amazon ended that, so now you can use whatever server you like, which makes things much easier. It shouldn't be too hard to convert these directions to another server host of your choice.

I used Hetzner with another build, and once my free EC2 year ended the AWS t2.micro cost me $14/mo. Hetzner has better specs and costs me $5/mo, so I added an nginx vhost and moved listmonk to the same server. Here's a $20 credit for Hetzner.

There is also the possibility to use the 1-click installers for their featured hosts: https://listmonk.app/ - listed under "Hosting providers". I'm not familiar with any of them but there are lots of new guides

@matthiasr
matthiasr / gpg_wsl2.md
Last active May 20, 2025 21:01
GPG signing with full gpg-agent support in WSL2: the easy way

Problem statement

Signing with GPG in Windows System for Linux (WSL2) does not work smoothly out of the box. Notably, when using a TTY-based pinentry, signing in Visual Studio Code does not work at all.

Solution

  1. Install Gpg4Win: winget install -e GnuPG.Gpg4win or download and install manually
  2. Start Kleopatra and generate or import keys
  3. Insert links to gpg.exe inside of WSL:
@enlavin
enlavin / main.py
Last active December 11, 2024 00:09
KMK circuitpython macropad firmware
import board
#from kmk.kmk_keyboard import KMKKeyboard
#from kmk.matrix import DiodeOrientation
#from kmk.keys import KC
# Updated to be compatible with the latest KMK release (which requires CircuitPython >= 7.0)
from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC
from kmk.scanners import DiodeOrientation
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@jimmywarting
jimmywarting / readme.md
Last active May 29, 2025 17:05
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@darekkay
darekkay / trakt-backup.php
Last active May 24, 2025 01:55
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";