Skip to content

Instantly share code, notes, and snippets.

@rickt
rickt / wvdl.sh
Created May 18, 2022 21:54
widevine downloader & decrypter
#! /bin/bash
#
# rough and ready bash script to download & decrypt a widevine-encrypted video via MPD URL
# this will work with (for example) channel5 UKTV
#
# assumptions:
# 1) the following binaries are in your $PATH:
# curl, ffmpeg, head, jq, mp4decrypt, yt-dlp
#
# this script requires 2x arguments:
@JohannesMP
JohannesMP / EnableDiscordDevExperiments.md
Last active May 27, 2025 04:15 — forked from ExordiumX/betaenabler.js
Enabling Discord Dev Experiments on Discord for Windows (2022-02)

Enable Dev Experiments in Discord for Windows

image

This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).

This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.


@ivan
ivan / discord_styles.js
Last active March 7, 2025 17:14
Userscript to fix Discord styles and replace server icons in the sidebar with text labels
// ==UserScript==
// @name Discord: Fix styles
// @namespace discord_styles
// @include *://discord.com/*
// @version 1
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle(`
@MeguminSama
MeguminSama / Discord Experiments.js
Last active April 29, 2025 08:31
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@dcts
dcts / workbench.colorCustomizations.json
Created April 14, 2020 16:51 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@fortinmike
fortinmike / convert-epub-to-mobi-with-calibre.sh
Created March 5, 2019 14:11
Convert EPUB files and packages to MOBI using the Calibre CLI (the app must be installed)
#!/bin/bash
DIRNAME=$(dirname -- "$1")
BASENAME=$(basename -- "$1")
if [ ! -d "$1" ]; then
# The EPUB is already a file, convert straight away
/Applications/calibre.app/Contents/MacOS/ebook-convert "$1" "$DIRNAME/$BASENAME.mobi"
else
# The EPUB is a directory, convert it to a file before conversion
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active May 29, 2025 09:38
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@butuzov
butuzov / mp3 to m4b.md
Created August 10, 2018 06:07
Convert mp3's to m4b using `ffmpeg`

Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).

URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL
@vsoch
vsoch / index.php
Last active June 2, 2024 14:28
Generate RSS feed for files in a directory folder. Put this file in a folder with files, modify the $allowed_ext variable to customize your extensions, and $feedName, $feedDesc, $feedURL, and $feedBaseURL. Then navigate to the folder on the web to see the xml feed. Done!
<?php
header('Content-type: text/xml');
/*
Runs from a directory containing files to provide an
RSS 2.0 feed that contains the list and modification times for all the
files.
*/
$feedName = "My Audio Feed";
$feedDesc = "Feed for the my audio files in some server folder";