Skip to content

Instantly share code, notes, and snippets.

@logical-and
logical-and / README.md
Last active October 22, 2023 13:02 — forked from pcworld/_README.md
Linux Spotify Ad Mute

We all love Spotify, but sometimes people (like us) want to throw a party without having to listen to interrupting ads before having bought Spotify Premium. Well, with this killer project, now you can!

This is for testing purposes ONLY! Spotify is a fantastic service and worth every penny. This script is NOT meant to circumvent buying premium! Please do consider switching to premium to support Spotify - especially if you're going to use it on mobile. If the script does not work for you, help us improve it!

Usage

wget -O spotify-mute-ads.sh https://gist.githubusercontent.com/logical-and/825bab160d604d82bf6ad9ebd3a6410d/raw/84f77518f6fa8980e73fcf1fadd30d223f2100a1/spotify-mute-ads.sh
chmod ug+x spotify-mute-ads.sh
./spotify-mute-ads.sh 
@sammdu
sammdu / ytdl.py
Last active September 10, 2020 00:16
[ytdl.py] Download a list of songs from YouTube, at the best audio quality. Can optionally download videos as well.
#!/usr/bin/env python3
import subprocess
from argparse import ArgumentParser
from pathlib import Path
from sys import exit, stderr
# [1/3] COMMAND LINE ARGUMENTS
@kototama
kototama / nethack_change_direction_keys.patch
Created July 17, 2018 15:53
How to change direction keys in NetHack
diff --git a/src/cmd.c b/src/cmd.c
index d7303ec..44bc0b5 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -3927,7 +3927,8 @@ void
reset_commands(initial)
boolean initial;
{
- static const char sdir[] = "hykulnjb><",
+ static const char sdir [] = "nluyi.eh><",
@kuznero
kuznero / WinUSBFromLinux.md
Last active August 23, 2021 13:20
How to make Windows 7 USB flash install media from Linux?

How to make Windows 7 USB flash install media from Linux?

StackOverflow

  • Install ms-sys - if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)
  • Check what device your USB media is assigned - here we will assume it is /dev/sdb. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:
# cfdisk /dev/sdb
or fdisk /dev/sdb (partition type 7, and bootable flag)
@disconnect3d
disconnect3d / template_use_loop_counter_as_tpl_arg.cpp
Last active December 12, 2019 13:54
C++ template for loop which use loop counter as template argument
#include <iostream>
#include <array>
template<size_t c>
struct ForLoop {
template<template <size_t> class Func>
static void iterate() {
Func<c>()();
ForLoop<c-1>::template iterate<Func>();
}
@ericandrewlewis
ericandrewlewis / index.md
Last active June 6, 2024 01:43
C++ Pointer Tutorial

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.

@techniq
techniq / audit_mixin.py
Created March 16, 2013 01:05
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""