Skip to content

Instantly share code, notes, and snippets.

View Vocaned's full-sized avatar
🐦‍⬛

voc Vocaned

🐦‍⬛
View GitHub Profile
#!/bin/bash
set -e
find .. -type f -iname "*.flac" | while read -r file; do
date_val=$(metaflac --show-tag=DATE "$file" | sed 's/^DATE=//')
originaldate_val=$(metaflac --show-tag=ORIGINALDATE "$flac_file" | sed 's/^ORIGINALDATE=//')
if [[ -n "$date_val" && -n "$originaldate_val" && "$date_val" != "$originaldate_val" ]]; then
echo "$file"
echo " $date_val -> $originaldate_val"
#!/bin/python
from mutagen.flac import FLAC
from pathlib import Path
import sys
REPLACEMENTS = {
'‘': "'",
'’': "'",
'“': '"',
'”': '"',
// Set up some prerequisites
if (typeof _mods === 'undefined') {
var _mods; webpackChunkdiscord_app.push([[Symbol()], {}, r => _mods = r.c]);
webpackChunkdiscord_app.pop();
}
if (typeof findByProps === 'undefined') {
var findByProps = (...props) => {
for (let m of Object.values(_mods)) {
try {
if (!m.exports || m.exports === window) continue;
import requests
import hashlib
from urllib.parse import urlencode
import json
api_key = input('API Key: ')
secret = input('Secret: ')
print(f'Open http://www.last.fm/api/auth/?api_key={api_key}')
token = input('Enter the token: ')
account-level-user-settings
account-revert
account-standing
activities-platform
activity-feed
age-gating
analytics
announcement-channels
application-identities
application-widgets
// Set up some prerequisites
if (typeof buttplug === 'undefined') {
throw 'error: Buttplug.js library not found. Please follow the usage instructions carefully.'
}
if (typeof _mods === 'undefined') {
var _mods; webpackChunkdiscord_app.push([[Symbol()], {}, r => _mods = r.c]);
webpackChunkdiscord_app.pop();
}
if (typeof findByProps === 'undefined') {
var findByProps = (...props) => {
We couldn’t find that file to show.
await (async () => {
let file = await showOpenFilePicker()
if (!file) return "File not picked";
file = await file[0].getFile();
if (!file.type.startsWith('audio/')) return 'Invalid file: Not an audio file'
let audioData = await new AudioContext().decodeAudioData(await file.arrayBuffer());
let ctx = new OfflineAudioContext({
numberOfChannels: 1,
length: audioData.length,
@Vocaned
Vocaned / emptypng.py
Last active June 29, 2025 08:54
generate an empty png with 1x0 pixel dimension
import struct
import zlib
import base64
def chunk(t, data):
return (struct.pack('>I', len(data)) + t + data
+ struct.pack('>I', zlib.crc32(t + data)))
png = (b'\x89PNG\r\n\x1A\n'
+ chunk(b'IHDR', struct.pack('>IIBBBBB', 1, 0, 1, 0, 0, 0, 0)) # https://www.w3.org/TR/png/#11IHDR
@Vocaned
Vocaned / bf.py
Last active June 29, 2025 08:54
python brainfuck interpreter i wrote at 3:30AM because i couldn't sleep
program = input()
programpointer = 0
buffer = {}
pointer = 0
tmp = []
loops = {}
for i,c in enumerate(program):
if c == '[':