Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Young by12380

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

Source: https://davidwalsh.name/git-branch-autocompletion

Start by downloading the git-completion.sh file from GitHub:

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

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

if [ -f ~/.git-completion.bash ]; then
@by12380
by12380 / amazon-lp-from-leetcode.txt
Last active Nov 19, 2021
Amazon LP Questions from LeetCode Interview Experiences
View amazon-lp-from-leetcode.txt
1.https://interviewgenie.com/blog-1/category/Amazon+interviews
2.https://www.youtube.com/channel/UCw0uQHve23oMWgQcTTpgQsQ/playlists
3.https://medium.com/@scarletinked/are-you-the-leader-were-looking-for-interviewing-at-amazon-8301d787815d
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
by12380 / Responsive svg in d3.md
Created Dec 6, 2018
Code for responsive svg in d3
View Responsive svg in d3.md

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)