Skip to content

Instantly share code, notes, and snippets.

@voidus
voidus / flake.nix
Created April 22, 2023 18:35
Build a cloudinit image in nixos
{
description = "A nixos cloudinit base image without nixos-infect";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
@codekitchen
codekitchen / streaming_rack_multipart_parser.diff
Last active April 15, 2017 01:16
diff of Rack::Multipart::Parser for streaming uploads
1c1
< require 'rack/utils'
---
> require 'streaming_upload'
3,4c3,18
< module Rack
< module Multipart
---
> class StreamingMultipartRequest < ActionDispatch::Request
> def parse_multipart(env)
import std.stdio;
import std.string;
import std.conv;
import std.array;
import std.range;
void times(int count, void delegate() cb) {
for (int i = 0; i < count; ++i) {
cb();
}