You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🌴
Vacation
kalle (jag)
applejag
🌴
Vacation
Started in web, travelled through game dev, ended up in backend and devops. I just recently renamed from jilleJr to applejag.
Looking for an efficient pure GO approach to copy repeating patterns into a slice, for a toy project, I ran a few tests and discovered a neat approach to significantly improve performance. For the toy project, I am using this to fill a background buffer with a specific RGB color pattern, so improving this performance significantly improved my acheivable framerate.
All the test were run with a buffer of 73437 bytes, allocated as follows
var bigSlice = make([]byte, 73437, 73437)
Fill the slice with the value 65 by looping through each element and setting the value
High Quality Pitch Shifting for Spotify on Windows with WSL2
The goal of this exercise is to get pitch shifting (changing the pitch of music up or down) working with Spotify on Windows 10 using WSL2. Technically this solution is really not dependent on WSL2 at all, but it does require you to have a Linux system running somewhere, whether virtual or physical, with extremely low latency and high throughput networking available to your Windows box.
For this solution, the actual sound playback will be occurring on your Windows PC using your soundcard, but there are other components of the solution that do some audio processing. I'll explain each.
Requirements
A Spotify Premium account
Windows build supporting WSL2; as of December 2019 that'd be the Insider Preview Slow or Fast Ring. This can also be done with Linux in VirtualBox, VMware, or Hyper-V, but I've not tested it.
(Windows PulseAudio From Source method only) A recent Fedora-based distribution of Linux
A modern distribution of Linux that can run a recent Rust toolchain; e.g. Debian Testing, l
sanitize HTML with jQuery prevent Application from XSS attacks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
General rules
Follow standard conventions.
Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
Boy scout rule. Leave the campground cleaner than you found it.
Always find root cause. Always look for the root cause of a problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters