Skip to content

Instantly share code, notes, and snippets.

View ammario's full-sized avatar
🌐

Ammar Bandukwala ammario

🌐
View GitHub Profile
@adolfopa
adolfopa / hof.f
Created February 10, 2017 23:36
Implementation of some higher order functions in Forth
: -range ( a-addr1 u -- a-addr2 a-addr1 )
cells over + ;
: range ( a-addr1 u -- a-addr1 a-addr2)
-range swap ;
: map! ( xt a-addr u -- )
range ?do i @ over execute i ! cell +loop ;
: foldl ( xt w1 a-addr u2 -- w2 )
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@mattratleph
mattratleph / vimdiff.md
Last active April 24, 2024 11:28 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)