Skip to content

Instantly share code, notes, and snippets.

@varemenos
varemenos / 1.README.md
Last active July 15, 2026 11:09
Git log in JSON format

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
@mathiasbynens
mathiasbynens / web-platform-status-links.md
Last active February 8, 2025 12:35
Web platform status links
@yang-wei
yang-wei / destructuring.md
Last active February 15, 2026 13:03
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@bangonkali
bangonkali / symlink.sh
Created August 9, 2016 15:03
Creating a symlink for visual studio code on mac os x el capitan
@evancz
evancz / data-interchange.md
Last active June 29, 2026 20:50
Why do I have to write JSON decoders in Elm?

A vision for data interchange in Elm

How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?

These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.

Literature Review

By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.

@bgourlie
bgourlie / mortality.md
Last active December 2, 2017 21:54
Interpreting DUSCMPUB-formatted mortality data

Interpreting mortality data in DUSCMPUB format

This gist explains how to interpret the DUSCMPUB-formatted mortality data found [here][1] in conjunction with the [reference PDF][2].

The [reference PDF][2] uses 3 components to describe the type of data, its location within the row, and its size:

  • data item: A specific datapoint, for example, a value representing the highest completed level of education.
  • tape location: The column within the line where a data item is located. Each character in a line represents a column, with each line having 472 columns.
  • size: The number of columns used to represent a particular data item.
@jan-warchol
jan-warchol / sync-history.sh
Last active May 27, 2026 08:57
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.
@rofrol
rofrol / moje wnioski macbook vs.md
Created April 26, 2018 13:00
moje wnioski macbook vs
  • macbook ma najlepszy touchpad
  • oprogramowania mniej niż na Windows, a jeśli już to płatne. Ale to i tak lepiej niż Linux gdzie jest stary Skype, nie można udostępniać ekranu w Slacku, nie ma wielu programów. Czasami jest jakiś program na maca którego nie ma na Windows jak np. Sketch.
  • przełączanie między aplikacjami: Mi na przykład bardziej pasuje zmiana programu przez alt+tab niż przesuwanie trzema palcami lub pokazanie wszystkich okien. Dodatkowo to pokazanie nie zawsze pokazuje miniatury. Nie wiem od czego to zależy. Dodatkowo przełączanie cmd+tab na macu grupuje aplikacje zamiast pokazać wszystkie okna. Jest hyperswitch ale on nie zachowuje stałej kolejności choć może jest to w opcjach. Dodatkowo niektóre aplikacje nie pokazują się przy używaniu hyperswitch jak są w fullscreen, np. zoom.us.
  • zewnętrzny monitor: nie da się z domyślnym oprogramowaniem zrobić only extrnal. Zainstalowałem jeden otwartoźródłowy i polecany, to wyłączył mi dwa ekrany
  • na zewnętrznym monitorze znika mi czasami kursor - musz
@JoelQ
JoelQ / elm-types-glossary.md
Last active March 30, 2025 21:26
Elm Type Glossary

Elm Types Glossary

There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.

@fvclaus
fvclaus / README.md
Last active January 8, 2024 16:16
Run vscode tasks with nvm

Nvm does not work in vscode tasks, because tasks are run without a shell. .bashrc is not loaded and the nvm command is unknown.

My solution uses a wrapper script around /bin/bash that reads in the correct node version from .npmrc in the project folder.

#!/bin/bash

set -e

if [[ "$2" == nvm* ]]; then

export NODE_VERSION=v$(cat .nvmrc)