These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
let toMap dictionary = | |
(dictionary :> seq<_>) | |
|> Seq.map (|KeyValue|) | |
|> Map.ofSeq |
//Dr. Seuss once wrote, "IF." He meant, "If you give a fuck, maybe, | |
//JUST MAYBE, you can change this shitty world in some small way for | |
//the better." I might've been an writer of children's books someday, | |
//but instead, I decided to make this. So in lieu of The Lorax, | |
//let's call this The Dragon, and have my word be, "DON'T." As in, | |
//"Don't do something stupid like this the way I did, you jackass." | |
//But the truth is humans are very stubborn creatures. You probably | |
//won't listen to my advice and, chances are, neither will I. | |
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
open System | |
// helper function to set the console collor and automatically set it back when disposed | |
let consoleColor (fc : ConsoleColor) = | |
let current = Console.ForegroundColor | |
Console.ForegroundColor <- fc | |
{ new IDisposable with | |
member x.Dispose() = Console.ForegroundColor <- current } | |
// printf statements that allow user to specify output color |
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.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Sanitize HTML with jQuery</title> | |
</head> | |
<body> | |
<h1>Sanitize HTML with jQuery</h1> | |
<h2>HTML Code</h2> |
Create a custom reassignment plan (see attached file inc-replication-factor.json
). In this case we are going from replication factor of 1 to 3.
Run Kafka partition reassignment script:
kafka-reassign-partitions --zookeeper $ZOOKEEPER_CONNECT \
--reassignment-json-file /home/liquidnt/inc-replication-factor.json \
--execute
Verify if the assignment was successful
Install virtualbox repo
cd /etc/yum.repos.d/
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
Edit virtualbox repo
nano /etc/yum.repos.d/virtualbox.repo
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.
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)