Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View robinp's full-sized avatar

Robin Palotai robinp

  • Budapest, Hungary
View GitHub Profile
@creachadair
creachadair / recommended-reading.md
Created November 9, 2019 15:46
Recommended reading
@Profpatsch
Profpatsch / hpack2nix.nix
Created May 26, 2017 18:00
hpack to nix file in nix expression
let
hpack2nix =
name: src:
let
addCabalFile = stdenv.mkDerivation {
inherit name src;
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
installPhase = ''cp -r . $out'';
patchPhase = ''
${haskellPackages.hpack}/bin/hpack
@globin
globin / configuration.nix
Last active March 1, 2024 00:46
prometheus on nixos
{ pkgs, lib, config, ... }:
{
networking = {
firewall.allowedTCPPorts = [
3000 # grafana
9090 # prometheus
9093 # alertmanager
];
useDHCP = true;
};
{config, ...}:
let
allowHttps = true;
serverTemplate = {
domain,
proxyTarget,
redirectWww ? false,
enableHttps ? false
}: let
@jamie-allen
jamie-allen / IoManagerBootstrap.scala
Created August 10, 2012 20:37
Simple example of how to use Akka IOManager Iteratee and exporting work to another actor
import akka.actor._
import akka.pattern.ask
import akka.util._
import akka.util.duration._
import scala.util.control.Exception._
/**
* To test, execute this code and use this command in a shell: "telnet localhost 8080"
* At the prompt, type in numbers and press enter, and they will be accumulated, returning
* the total value each time.