Skip to content

Instantly share code, notes, and snippets.

@freaktechnik
freaktechnik / qobuz.js
Created October 13, 2020 20:59
Qobuz makes you download individual tracks in big orders. This automatically downloads an entire album.
async function download(album) {
const albums = document.querySelectorAll('.order-tracklisting .table');
const target = albums[album];
const downloads = target.querySelectorAll('.btn.tracks');
function wait(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
for (const button of downloads) {
button.click();
console.log('download');
@freaktechnik
freaktechnik / lichtensteien.js
Last active April 26, 2024 22:05
Just a random user script
// ==UserScript==
// @name Lichtensteien
// @namespace Violentmonkey Scripts
// @include http://*
// @include https://*
// @include *
// @grant none
// @version 1.0
// @author Martin Giger
// @description 11/10/2020, 1:40:47 PM
'use strict';
const {messageValue, reply, random, isBot} = require('../server/tools');
const config = require('../config');
require('dotenv').config();
var CLIENT_ID = config.twitch.TWITCH_CLIENT_ID;
var CLIENT_SECRET = config.twitchTWITCH_SECRET;
var GET_TOKEN = config.twitch.TOKENURL;
var GET_STREAM = config.twitch.TWITCH_GET_USER_URL;
var TOKEN = config.twitch.TWITCH_CURRENT_TOKEN;
function party() {
const colors = Array.from(document.styleSheets).find(stylesheet =>
stylesheet.href.endsWith("colors.css")
).cssRules[0].style;
const colorVariables = Object.values(colors);
const sourceStyles = document.documentElement.style.getPropertyValue(
colorVariables[0]
)
? document.documentElement.style
: colors;
@miliarch
miliarch / install-arch-in-virtual-machine.md
Last active April 26, 2024 22:05
Install Arch Linux in a Virtual Machine
@thoughtsunificator
thoughtsunificator / tweet-parser.js
Created September 29, 2021 16:32
Tweet parser
export const STATE_SEARCHING = "STATE_SEARCHING"
export const STATE_TOKENIZING_HASHTAG = "STATE_TOKENIZING_HASHTAG"
export const STATE_TOKENIZING_MENTION = "STATE_TOKENIZING_MENTION"
export const PREFIX_HASHTAG = "#"
export const PREFIX_MENTION = "@"
export const tokenize = function(text) {
let characters = [...text]
let state = STATE_SEARCHING
let tokens = []
@thoughtsunificator
thoughtsunificator / uri-tokenizer.js
Created September 29, 2021 16:33
URI Tokenizer
export const STATE_IDENTIFYING = "STATE_IDENTIFYING"
export const STATE_TOKENIZING_NORMAL = "STATE_TOKENIZING_NORMAL"
export const STATE_TOKENIZING_SPECIAL = "STATE_TOKENIZING_SPECIAL"
export const TOKEN_SEPARATOR = "/"
export const TOKEN_SPECIAL_PREFIX = "{"
export const TOKEN_SPECIAL_SUFFIX = "}"
export const TOKEN_TYPE_NORMAL = "normal"
export const TOKEN_TYPE_SPECIAL = "special"
@thoughtsunificator
thoughtsunificator / appGroup.js
Last active April 26, 2024 22:04
Enable ctrl + right click cycling through windows in Linux Mint 20.2 Cinnamon Edition
if(ctrlPressed && button === 1) {
let currentIndex = 0
for (let i = 0; i < this.groupState.metaWindows.length; i++) {
if(this.groupState.metaWindows[i] === this.groupState.lastFocused) {
currentIndex = i
}
}
if(currentIndex === this.groupState.metaWindows.length - 1) {
currentIndex = 0
} else {
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 22:05
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active April 26, 2024 22:03
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg