this hook queues up store paths on a unix domain socket and then spawns a service to actually push the store path to the cache through socket activation
works on MacOS and Linux
{-# LANGUAGE RankNTypes, PatternSynonyms, GADTs, ViewPatterns, LambdaCase, ScopedTypeVariables #-} | |
module Main where | |
import Data.Map as Map | |
import Control.Monad (ap, liftM) | |
import Data.IORef | |
data ComeFromOp a where | |
Line :: Int -> ComeFromOp () | |
LiftIO :: IO () -> ComeFromOp () |
{ lib, config, pkgs, ... }: | |
with lib; | |
let | |
veth = "veth-vpn"; | |
hostIp = "10.0.0.1/24"; | |
guestIp = "10.0.0.2/24"; |
#ifndef __cplusplus | |
# define decltype typeof | |
# include <stdbool.h> | |
#endif | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#define TOKEN_CONCAT_EX(x, y) x##y | |
#define TOKEN_CONCAT(x, y) TOKEN_CONCAT_EX(x, y) |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
by Bruce Pascoe - 1 May, 2019
"A monad is just a monoid in the category of endofunctors. What's the problem?" ~James Iry[^1]
The problem... is that there are several problems.
It's been said that monads bear a dreadful curse. Once you finally understand what they are, you begin to see them everywhere--but somehow become completely incapable of explaining them to anyone else. Many tutorial writers have tried to break the Great Curse--the Web is lousy with bold attempts and half successes that attest to this--and just as many have failed. Well, I'm here to address the elephant in the room[^2] and tell you that I intend to break the Great Curse once and for all.
There are basically two ways a monad tutorial tends to go. One is a paragraph or two of minimal descriptions of one or two common monads (Haskell's Maybe
in particular is very popular), followed by a lot of intimidating Haskell syntax trying to explain--precisely--how it all fits together. This is well
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
This document contains some ideas for additions to the Nix language.
The Nix package manager, Nixpkgs and NixOS currently have several problems:
enableFoo
, but there is no way for the Nix
UI to discover them, let alone to provide programmatic ways toclass left_pad: | |
def __init__(this,PadChar=' ',width=4): | |
this.PadChar=PadChar | |
this.width = width | |
def LeftPad(this,stringToPadWithChar): | |
charsToPad=this.width-len(stringToPadWithChar) | |
OutStr='' | |
if(charsToPad>0): | |
for i in range(0,charsToPad): | |
OutStr=OutStr+this.PadChar |
Hacking CORS restriction to enable in-browser XHR to any server.
Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80
, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.
Run: