Skip to content

Instantly share code, notes, and snippets.

View ylixir's full-sized avatar

Jon Allen ylixir

View GitHub Profile
@ylixir
ylixir / ffi.elm
Created April 23, 2020 15:12
notes on elm ffi hackery
D.decodeValue
(D.field "return" D.float)
(En.object [ ( "__elm-js-ffi", En.list En.float [ 1, 2 ] ) ])
@ylixir
ylixir / main.md
Created June 14, 2018 21:00
Updating Nix development environments #nix #nixpkg #blog

I've been slacking on my Nix learning. I finally looked up how to update dev environments (all environments actually) to minty fresh versions. Simply run the following commands:

$ sudo nix-channel --update
$ nix-env --u always

And that's it. Now you will have the newest versions of all your stuff next time you run

$ nix run -f shell.nix
@ylixir
ylixir / main.md
Created April 10, 2018 11:57
Getting fish and javascript to play nicely with nixpkg #blog #fish

Getting rolling with nix has a much steeper learning curve than I imagined. It seems one should treat it more like learning a full programming language, rather than just a simple utility.

So progress is slow, but I have good successes. The one I'll talk about today isn't really nix related as much. Fish is a really nice shell to use, but has some serious pain points when trying integrate the thing with the rest of ones system. The reason for both of these is the same: it ditches posix compliance. In practice that means that using the friendly interactive shell and writing scripts for it is a dream. Also none of your environment like paths, etc work really, because they are configured through posix compliant shell scripts...

Of course you can setup paths oneself, and do all the other things, but it is a giant pain point, and it's difficult to do so in a cross platform way. Which means that my shell configuration in my dotfiles is useless.

@ylixir
ylixir / main.md
Created March 31, 2018 04:45
Sharing secrets: keeping work and personal cyberlife separately together #blog

So my daughter is into Roblox lately, and she's always wanting to use my machine so she can "stream".

Meanwhile, recently my employer allowed me to trade in this god aweful 90 pound laptop for a Macbook that is actually reasonbly nice to work with.

In general I like to keep my work and personal life separated, but this Mac makes it really easy to create encrypted volumes, and I'd already broke down a bit and created a separate Firefox profile. Meanwhile, I've been eyeing nix and thinking about revamping my dotfiles...

So in order to do this, I wanted to make sure that since my work computer doesn't belong to me,

@ylixir
ylixir / main.md
Last active April 7, 2023 21:29
Blog : Getting bluetooth headphones working on void linux with ALSA

I have a great little sub $20 bluetooth headset that I've been too lazy to get working on my laptop. I run Void Linux because for me systemd creates more headaches than it solves and I prefer minimalism for a machine beholden to a battery. Similarly I consider PulseAudioto have an unacceptable level of overhead for what it brings to the table. So my goal is to get my headphones working on my laptop with these constraints.

Unfortunately the [Bluetooh page of the Void Wiki][void-wiki] is less than useless. I should probably go back and add some stuff for them one of these days. Fortunately the [Bluetooth page of the Arch Wiki][arch] is more helpful, but not 100% precise.

You will need to install Bluez with # xpbs-install -Sy bluez and add yourself to the bluetooth group with the command # useradd -G bluetooth . You might want to log out and back in at this point. This way you can make sure your

@ylixir
ylixir / DSC_0193.JPG
Last active November 12, 2017 21:11
I made a blog
DSC_0193.JPG
@ylixir
ylixir / focus-follows-mouse-atom
Last active November 23, 2015 22:49
Focus follows mouse for Atom editor
# Focus Follows Mouse
# -----------------------------------------
# put this in init.coffee
focusPane = (item) ->
item.activate()
try
item.activeItem.focusTerm()
catch err
console.log(err)

Keybase proof

I hereby claim:

  • I am ylixir on github.
  • I am ylixir (https://keybase.io/ylixir) on keybase.
  • I have a public key whose fingerprint is EAE0 8949 3F87 88AA C402 BA2C 2288 AEBE 29A0 32C3

To claim this, I am signing this object: