Find it here: https://github.com/bitemyapp/learnhaskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reset the current branch to the commit just before the last X: | |
# X is here the number of commits to squash together | |
git reset --hard HEAD~X | |
# HEAD@{1} is where the branch was just before the previous command. | |
# This command sets the state of the index to be as it would just | |
# after a merge from that commit: | |
git merge --squash HEAD@{1} | |
# Commit those squashed changes. The commit message will be helpfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var BVT = function(width, depth, init, elems) { | |
this._width = width; | |
this._depth = depth; | |
this._leaf = depth === 1; | |
this._shift = (this._depth - 1) * Math.round(Math.log(width) / Math.log(2)); | |
this._himask = this._width - 1; | |
this._lomask = Math.pow(2, this._shift) - 1; | |
this._elems = elems; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Ascii String Zdiv. | |
Open Scope string. | |
Inductive format := | |
| fmt_int : format -> format | |
| fmt_string : format -> format | |
| fmt_other : ascii -> format -> format | |
| fmt_end : format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell, FlexibleContexts, FlexibleInstances, GADTs, DataKinds, | |
TypeInType, KindSignatures, InstanceSigs, TypeOperators, | |
ConstraintKinds, RankNTypes, ScopedTypeVariables, TypeFamilies, | |
UndecidableInstances, MultiParamTypeClasses, TypeApplications, PartialTypeSignatures #-} | |
--{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise -fplugin GHC.TypeLits.KnownNat.Solver #-} | |
-- Three attempts at implementing a 'concat' operation for arbitrary dimension tensors, | |
-- concat dim xs ys is valid only if tensor xs and tensor ys share the same shape | |
-- (except for the dimension being joined) |
Okay, I've got a need to build Firefox from source, and I'd like to do that on a remote machine, and then copy build result back to my laptop. With Nix, using bastion host. I'll note details of my successful adventure.
Here's the list of resources I've used actively:
- https://nixos.wiki/wiki/Distributed_build
- https://nixos.org/nix/manual/#conf-trusted-substituters and various other configuration parameters
- https://github.com/NixOS/nixpkgs/blob/release-19.09/nixos/modules/services/misc/nix-daemon.nix which contains mappings from Nix config names to NixOS config names (damn, they are different!)
Here's my setup: