Skip to content

Instantly share code, notes, and snippets.

View Ma5onic's full-sized avatar
🎧
Remixing

Ma5onic

🎧
Remixing
View GitHub Profile
@Ma5onic
Ma5onic / generating-synth-patches-with-ai.md
Created February 25, 2024 01:07 — forked from 0xdevalias/generating-synth-patches-with-ai.md
Some notes on generating software synthesizer patches with AI
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
@Ma5onic
Ma5onic / pytorch_tips_yt_follow.ipynb
Created September 21, 2022 16:31 — forked from ejmejm/pytorch_tips_yt_follow.ipynb
pytorch_tips_yt_follow.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Ma5onic
Ma5onic / mount_qcow2.md
Created September 17, 2022 15:16 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@Ma5onic
Ma5onic / Steam_Proton_Exe.md
Created September 3, 2022 07:26 — forked from michaelbutler/Steam_Proton_Exe.md
How to run another .exe in an existing proton wine prefix

Running games through Steam's Proton is great. But what if there is a secondary exe or configuration application bundled with the game? How can you launch it if Steam itself only launches the game?

Simply run this command in a terminal:

cd /path/to/steam/steamapps/compatdata/20920/pfx

STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
    "$HOME/.steam/root/steamapps/common/Proton 5.0/proton" run ./drive_c/path/to/custom_application.exe
@Ma5onic
Ma5onic / n64_tlb.txt
Created April 12, 2022 21:32 — forked from parasyte/n64_tlb.txt
N64 TLB
FORMATS
EntryLo0 & EntryLo1:
00 pppppppppppppppppppppppp ccc d v g
(32-bit: 2.24.3.1.1.1)
p = Page frame number; the upper bits of the physical address.
c = Specifies the TLB page coherency attribute. (See below)
d = Dirty. If this bit is set, the page is marked as dirty and, therefore, writable
This bit is actually a write-protect bit that software can use to prevent alteration
@Ma5onic
Ma5onic / raphael-svg-buildjson
Created February 10, 2022 04:02 — forked from benbarnett/raphael-svg-buildjson
loop through the 'paper' variable from Raphael JS and build up the JSON object describing all images and paths within it.
// loop through the 'paper' variable from Raphael JS and build up the JSON object describing all images and paths within it.
buildJSON = function(paper) {
var svgdata = [];
svgdata.push({
width: 390,
height: 400
});
$.each(paper,
@Ma5onic
Ma5onic / Audio Steganography - sender.py
Created July 16, 2019 18:56 — forked from reachsumit/Audio Steganography - sender.py
This code contains a demo for Audio Steganography. It is to be used by sender end to embed text mentioned in string variable to the audio file.
# We will use wave package available in native Python installation to read and write .wav audio file
import wave
# read wave audio file
song = wave.open("song.wav", mode='rb')
# Read frames and convert to byte array
frame_bytes = bytearray(list(song.readframes(song.getnframes())))
# The "secret" text message
string='Peter Parker is the Spiderman!'
# Append dummy data to fill out rest of the bytes. Receiver shall detect and remove these characters.
@Ma5onic
Ma5onic / Audio Steganography - receiver.py
Created July 16, 2019 18:56 — forked from reachsumit/Audio Steganography - receiver.py
This code contains a demo for Audio Steganography. It is to be used by the receiver end, to extract the secret text embedded in the audio file.
# Use wave package (native to Python) for reading the received audio file
import wave
song = wave.open("song_embedded.wav", mode='rb')
# Convert audio to byte array
frame_bytes = bytearray(list(song.readframes(song.getnframes())))
# Extract the LSB of each byte
extracted = [frame_bytes[i] & 1 for i in range(len(frame_bytes))]
# Convert byte array back to string
string = "".join(chr(int("".join(map(str,extracted[i:i+8])),2)) for i in range(0,len(extracted),8))
@Ma5onic
Ma5onic / Audio Steganography_ultrasound - sender.ny
Created July 16, 2019 18:56 — forked from reachsumit/Audio Steganography_ultrasound - sender.ny
This code was shared by Audacity user edgar-rft (https://forum.audacityteam.org/memberlist.php?mode=viewprofile&u=5642) to generate silent subliminals and is an implementation of Oliver M. Lowery's 1989 patent (https://patents.google.com/patent/US5159703A/en).
;nyquist plug-in
;version 1
;type process
;name "Subliminal..."
;action "Subliminal..."
;control carrier "Carrier" real "Hz" 17500 14000 20000
(setf carrier (max 14000 (min carrier 20000)))
;; We have two Nyquist frequencies, carrier/2 and *sound-srate*/2.