This file contains hidden or 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
$ git clone http://code.hledger.org hledger | |
$ cd hledger | |
$ stack build hledger | |
$ stack ghc extra/hledger-rewrite.hs | |
$ mv extra/hledger-rewrite ~/.local/bin | |
$ cd .. | |
$ hledger-rewrite --help | |
hledger-rewrite [OPTIONS] [PATTERNS] --add-posting "ACCT AMTEXPR" ... | |
print all journal entries, with custom postings added to the matched ones |
This file contains hidden or 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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
This file contains hidden or 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
module Main (main, zip, zipRecord, class ZipRowList) where | |
-- | After Tuesday's experiments, let's move onto a slightly more | |
-- | interesting example. Last time, I confess, I cheated a bit to | |
-- | avoid getting too deep into RowToList stuff. Today, I'm not | |
-- | going to cheat, and get riiiight into it. When we're thirty lines | |
-- | in, don't say you weren't warned! | |
import Prelude (($), discard, Unit) | |
import Control.Monad.Eff (Eff) |
This file contains hidden or 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
/** | |
* @dev OpcodeChecker processes contract code to generate a bitmap of used opcodes. | |
* | |
* DO NOT USE: See the vulnerability identified by Recmo below. A patch will be provided soon. | |
* | |
* The generated bitmap can be used to enforce whitelisting and blacklisting on contract code. | |
* Bit n of the bitmap is set iff opcode n is used. For instance, the presence of the STOP opcode | |
* will result in bit 0 of the bitmap being set. | |
* | |
* A best-effort attempt is made to skip over unreachable data, but there may be false positives. |
OlderNewer