Skip to content

Instantly share code, notes, and snippets.

View pdaoust's full-sized avatar

Paul d'Aoust pdaoust

View GitHub Profile
@pdaoust
pdaoust / higher-order-functions.scss
Last active April 5, 2023 11:07
Higher-order functions for Sass 3.3 -- now that we've got the `call()` function in Sass, we can start to compose functions. We don't have the benefit of anonymous functions, of course, but this is real functional programming, folks!
// 'map', 'transform', 'select', or 'project' function. Iterate over a list,
// performing a function on each item, and collecting the new items. Each
// function takes an item as a first argument and returns a transformed item.
// You can pass additional arguments to the function too, which is a decent poor
// man's function composition.
// (I didn't call this f-map because the term 'map' is already used in Sass to
// denote a hash or dictionary.)
@function f-apply($func, $list, $args...) {
$new-list: ();
@each $item in $list {
building Nix...
building the system configuration...
error: executing 'git': No such file or directory
error: executing 'git': No such file or directory
error: while evaluating the attribute 'config.system.build.toplevel' at /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/nixos/modules/system/activation/top-level.nix:274:5:
while evaluating 'foldr' at /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/lib/lists.nix:52:20, called from /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/nixos/modules/system/activation/top-level.nix:138:12:
while evaluating 'fold'' at /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/lib/lists.nix:55:15, called from /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/lib/lists.nix:59:8:
while evaluating 'showWarnings' at /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/lib/trivial.nix:265:28, called from /nix/store/7f4c0dzcxpsh8yha84kbgqkql10s50fz-nixpkgs/nixos/modules/system/activation/top-level.nix:135:10:
while evaluating 'foldr' at /nix/store/7f4c0dzcxpsh8yha84kbgq
@pdaoust
pdaoust / debug_output_from_hc_test.txt
Created June 26, 2020 17:25
Intermittent failure of tryorama test -- alice/bob links on agent ID
Packaging files for testing to file: "/home/paul/Holochain/test-holonix-0.0.75/coreconcepts/cc_tuts/dist/cc_tuts.dna.json"
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR "
/home/paul/Holochain/holonix/target
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR"
Finished release [optimized] target(s) in 0.13s
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && wasm-gc $CARGO_TARGET_DIR/wasm32-unknown-unknown/release/hello.wasm
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && wasm-gc $CARGO_TARGET_DIR/wasm32-unknown-unknown/release/hello.wasm"
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_firs
@pdaoust
pdaoust / Cargo.lock
Created May 21, 2020 04:30
Cargo lockfile for compiled zome
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "aho-corasick"
version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@pdaoust
pdaoust / SassMeister-input.scss
Created December 5, 2013 22:57
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// 'map', 'transform', 'select', or 'project' function. Iterate over a list,
// performing a function on each item, and collecting the new items. Each
// function takes an item as a first argument and returns a transformed item.
// You can pass additional arguments to the function too, which is a decent poor
// man's function composition.
@pdaoust
pdaoust / Markdown primer
Created February 20, 2014 22:18
Markdown primer
# A quick primer on Markdown
## Paragraphs
Markdown aims to be a markup language that's natural to write and read, as if it were typed on a typewriter. You can write in Notepad, or whatever text editor you prefer, and copy/paste it into an e-mail, or save it as a .txt file and send it to us as an attachment if you like. **StackEdit isn't a necessary part of the process**; it just helps you see what the conversion to HTML will look like. It also gives you buttons for all the features.
For the most part, you just write as you normally would -- paragraphs are just blocks of text separated by two carriage returns, and the Markdown parser will turn them into HTML paragraph tags for you.
You can emphasize a bit of your text by wrapping it with asterisks: *one asterisk for emphasis (italic)*, and **two asterisks for heavy emphasis (bold)**. If you prefer, you can use _single_ or __double underlines__ instead of asterisks.
@pdaoust
pdaoust / SassMeister-input.scss
Created January 8, 2014 22:55
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$replacement-selector: a child, b child;
.class1, .class2 {
@at-root #{$replacement-selector} {
color: green;
@pdaoust
pdaoust / SassMeister-input.scss
Created December 6, 2013 22:00
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@mixin lighten-bg-color-by-10-percent($color) {
$lightened: lighten($color, 10%);
background-color: $lightened;
}
@pdaoust
pdaoust / SassMeister-input.scss
Created December 6, 2013 22:02
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$have-i-been-written-to-yet: false;
p {
$have-i-been-written-to-yet: true;
color: red;
@pdaoust
pdaoust / SassMeister-input.scss
Created December 6, 2013 22:00
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@mixin lighten-bg-color-by-10-percent($color) {
$lightened: lighten($color, 10%);
background-color: $lightened;
}