Skip to content

Instantly share code, notes, and snippets.

View w3dg's full-sized avatar
:fishsticks:

Debopam Gupta w3dg

:fishsticks:
View GitHub Profile
@w3dg
w3dg / robot-and-batteries.md
Created April 3, 2022 16:41 — forked from w3cj/robot-and-batteries.md
Brain Teaser Warm-Up

Problem

A robotic technology startup is located in San Francisco. The CEO has 3000 battery packs that he wants to transport with Danny (the robotic bird) to his other branch, across a 1000-kilometer stretch of land. The owner has only one robotic bird, which carries a maximum of 1000 battery packs at any moment in time, and consumes one battery pack every kilometer it travels.

Question

What is the largest number of battery packs that can be delivered to the branch?

@w3dg
w3dg / git-gpg-sign.txt
Created January 1, 2022 04:29 — forked from tuxfight3r/git-gpg-sign.txt
signing git commits with GPG keys.
# generate a key if you don't have one already
gpg --full-gen-key
# list the keys in long format and copy the key id after sec rsa4096/<KEY>
gpg --list-secret-keys --keyid-format LONG
# export the public key and post into your git profile (ui)
gpg --armor --export 127CAA89CEA6BE66