Skip to content

Instantly share code, notes, and snippets.


Brian Young by12380

View GitHub Profile
by12380 / Git branch
Last active Jul 11, 2020
Git branch autocompletion
View Git branch


Start by downloading the file from GitHub:

curl -o ~/.git-completion.bash

Next, add the following to your ~/.bash_profile file:

if [ -f ~/.git-completion.bash ]; then
by12380 / amazon-lp-from-leetcode.txt
Last active Nov 19, 2021
Amazon LP Questions from LeetCode Interview Experiences
View amazon-lp-from-leetcode.txt
Tell me about a situation where you had a conflict with someone on your team. What was it about? What did you do? How did they react? What was the outcome?
Give an example of when you saw a peer struggling and decided to step in and help. What was the situation and what actions did you take? What was the outcome?
Tell me about a time you committed a mistake?
Tell me about a time when your earned your teammate's trust?
by12380 / Responsive svg in
Created Dec 6, 2018
Code for responsive svg in d3
View Responsive svg in

Append the following code immediately after .append("svg") to the SVG you want to be responsive.

.attr("preserveAspectRatio", "xMidYMid meet")
.attr("viewBox", `0 0 ${width} ${height}`)
.append("g").attr("width", width).attr("width", height)

width refers to the width of your SVG (prior to being responsive)

height refers to the height of your SVG (prior to being responsive)