Skip to content

Instantly share code, notes, and snippets.

mx00s /
Last active August 22, 2023 06:11
NixOS install script based on @grahamc's "Erase Your Darlings" blog post
#!/usr/bin/env bash
# NixOS install script synthesized from:
# - Erase Your Darlings (
# - ZFS Datasets for NixOS (
# - NixOS Manual (
# It expects the name of the block device (e.g. 'sda') to partition
chrisroos /
Last active December 14, 2020 14:37
Example of using bundler/inline

I came across 'bundler/inline' in Bundler pull request 3440, which I'd found from Rails pull request 20429. This now has a little snippet on the What's new page of the Bundler site.

This little example demonstrates how I might use it to create a single file using minitest.

I've just noticed that this script was working for me because I already had minitest installed as a system gem. If I uninstall the gem then the script fails because it can't find minitest. The source code documents an option to install gems if they don't exist (gemfile(true) do) but that doesn't seem to work for me. I see the following error:

Fetching gem metadata from
Fetching version metadata from
Resolving dependencies...

Using metaclass 0.0.4

arunoda /
Last active March 18, 2016 21:18
Meteor Latency Compensation - The Correct Way

##Meteor Latency Compensation - The Correct Way

This is a kind of correction I wan't make regards to the concept describe in discover-meteor book

For the latency compensation to occur we cloud simply share the same method in the client/server. We can do this by simply putting the method under a place which can see by bot the server and client.

But practically(not all the time) we should not do that. In the server code we might have some logic which should not share. Or simply we might have some secret tokens.

So the correcy approach is define the method (in this case post) seperately in the two context. as shown below