Tony Bytes

Hello! Welcome to my blog.

Generating a Gitignore for Any Project

The company Toptal runs a wonderful api for composing a .gitignore on the fly

By composing, I mean you give it a list of components that should be considered (Operating Systems, IDEs, Programming Languages), and it generates a .gitignore snippet for each and concatenates them into one.

The api has a web interface at https://www.toptal.com/developers/gitignore

Screenshot of https://gitignore.io/ web interface
gitignore.io web interface

But also an api at https://www.toptal.com/developers/gitignore/api/ that can be interacted with from the command line:

curl -s https://www.toptal.com/developers/gitignore/api/

Which returns

gitignore.io help:
  list    - lists the operating systems, programming languages and IDE input types
  :types: - creates .gitignore files for types of operating systems, programming languages or IDEs

In this byte we’ll use the api to create some .gitignore files for a project and then see how to call the api directly from git.

If you just want the main takeaways, go to the tl;dr at the end.

Read more >

Cap Theorem

During a network partition, a distributed system must choose between consistency and availablity.

– Unknown