Skip to content

Instantly share code, notes, and snippets.

sebastian-stephan / shell.nix
Created Dec 20, 2017
Development environment with local postgres for nix-shell
View shell.nix
{ pkgs ? import <nixpkgs> {}, ... }:
inherit (pkgs) stdenv;
in stdenv.mkDerivation {
name = "myproject-devenv";
buildInputs = with pkgs; [
shellHook = ''
export PGDATA=$PWD/postgres_data
chrisroos /
Last active Dec 14, 2020
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 Mar 18, 2016
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