Skip to content

Instantly share code, notes, and snippets.

@ivan
ivan / discord_styles.js
Last active October 27, 2023 18:20
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 July 25, 2024 10:24
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
@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";