Skip to content

Instantly share code, notes, and snippets.

View by12380's full-sized avatar

Brian Young by12380

View GitHub Profile
@by12380
by12380 / Responsive svg in d3.md
Created December 6, 2018 23:38
Code for responsive svg in d3

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)

@by12380
by12380 / Git branch autocompletion.md
Last active July 11, 2020 00:07
Git branch autocompletion

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

Detriot

{
  saturation_one_bed_last_year: [
    {
      booked: 258,
      total: 286,
      percentage: 0.9020979020979021,
      month: 8,
      year: 2021
@by12380
by12380 / amazon-lp-from-leetcode.txt
Last active March 27, 2024 07:45
Amazon LP Questions from LeetCode Interview Experiences
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?