Skip to content

Instantly share code, notes, and snippets.

View clementgarbay's full-sized avatar
👨‍🚀

Clément Garbay clementgarbay

👨‍🚀
View GitHub Profile
@clementgarbay
clementgarbay / setup-guide.md
Last active March 26, 2019 17:11
Growth.Dev - Setup Guide

[Growth.Dev] How to transform Linkedin into an address book using Puppeteer!

Prerequisites 🛠

  • A command line terminal, if you're not familiar with it you can read this post explaining the basics. For the best experience, we recommend you iTerm2 an alternative to the pre-install macOS terminal.

  • The JavaScript runtime Node.js. If you're a brew user you can simply brew install node, otherwise you can download it here. Moreover here's an article where you can find more information about how to install it and use it.

To be sure both of these tools are OK, open a terminal and run:

@clementgarbay
clementgarbay / collections.kt
Created April 21, 2018 10:34
Safe transpose a list of unequal-length lists in Kotlin.
/**
* Safe transpose a list of unequal-length lists.
*
* Example:
* transpose(List(List(1, 2, 3), List(4, 5, 6), List(7, 8)))
* -> List(List(1, 4, 7), List(2, 5, 8), List(3, 6))
*/
fun <E> transpose(xs: List<List<E>>): List<List<E>> {
// Helpers
fun <E> List<E>.head(): E = this.first()