Skip to content

Instantly share code, notes, and snippets.

View dmalikov's full-sized avatar
🥞
!

Dmitry Malikov dmalikov

🥞
!
View GitHub Profile
@dmalikov
dmalikov / diffsdiff.md
Created April 30, 2015 15:06
`git-diff` != `git-diff-tree`?

Suppose there is a commit C which have a single parent commit P.

Let's say that TC and TP are the corresponding tree objects.

Why git diff P C is not always equal to git diff-tree TP TC -p?


Why they should be equal?

@dmalikov
dmalikov / gist:7ad1e9331c696f437c38
Created May 2, 2015 21:18
nix-shell -p haskellngPackages.cabal2nix
>> nix-shell -p haskellngPackages.cabal2nix
these derivations will be built:
/nix/store/34i3bkyry0lfxbxmcx4s1ilricwhhqv3-hscolour-1.21.tar.gz.drv
/nix/store/1dvakqvcwk4hsfzl3fhy2fml30j0ar3y-hscolour-1.21.drv
/nix/store/giqr5pcds9r1mpwi806r4yvsq6pi50wh-haskell-mtl-2.1.3.1.drv
/nix/store/si9rsg03d181vwxwavpgyvxxjhn7hc5d-haskell-logict-0.6.0.2.drv
/nix/store/04xhj4cz4cwcj9xa74b0z1q0934iypj9-haskell-smallcheck-1.1.1.drv
/nix/store/0l3p4a85a0r6m0sg6rld7agj3l7jyyi3-tasty-golden-2.2.2.4.tar.gz.drv
/nix/store/0pyk34zzr2m1wh16fgyhn5gxrxs101gg-syb-0.4.4.tar.gz.drv
/nix/store/0qql92h7l71g9ncz3mdzh6maim6qkbwr-abstract-deque-0.3.tar.gz.drv
@dmalikov
dmalikov / wat.ps1
Last active September 5, 2015 17:56
Meanwhile on the Planet of Adequate Programming Languages
################## PART ONE
> ("a" + "b" * 3).length
4
> ("a" + , "b" * 3).length
6
################## PART TWO
> if (2 > 1) { echo "two is larger than one" } else { echo "no it is not" }
no it is not
instance FromJSON Database where
- parseJSON (Object o) = Database
- <$> o .: "id"
- <*> o .: "_rid"
- <*> o .: "_ts"
- <*> o .: "_self"
- <*> o .: "_etag"
- <*> o .: "_colls"
- <*> o .: "_users"
+ parseJSON (Object o) =
@dmalikov
dmalikov / README.md
Created July 15, 2024 22:59
remove HR from garmin activity

Remove HR from TCX file

Requirements

stack is required. On MacOS it can be installed via brew install stack.

Usage

Assuming there is an affected Garmin activity that you want to remove HR data from.