teleren/devto huggingface dataset:
Git add an upstream to a forked repo
Tags: gitupstream, gitfork, gitpullupstream
Published: 2019-03-07 17:29:49

---
title: Git add an upstream to a forked repo
published: true
description: 
tags: git upstream, git fork, git pull upstream 
---

Thanks for taking the time to check this out! Please feel free to add helpful comments or feedback! 

This is a mini cheat sheet that assumes you are familiar with git, and have all tools installed, and a project terminal session open in your editor. 

This assumes you have [forked a repo using the GIT gui](https://help.github.com/en/articles/fork-a-repo).

```
git clone -v <git url>
```

To rebase your branch with the upstream branch (remote branch from which you forked your branch),

you need add the branch to your list of 'remote branches' as an upstream, adding it to the list of remote branches visable via the git branch -av command.


```
git checkout <your-origin-branchname> (e.g. git checkout master)
```

Switched to branch 'your-origin-branch'
Your branch is up-to-date with 'origin/your-origin-branch'.


```
git remote add upstream <remote branch url> 

e.g. git remote add upstream https://github.com/cypress-io/cypress.git

```
Adds the remote branch to your repo as upstream. To check this:

```
git remote -v
```
You should see:

```
git remote -v
origin  https://github.com/louise-hayes/Project-3-Speech.git (fetch)
origin  https://github.com/louise-hayes/Project-3-Speech.git (push)
upstream        https://github.com/peraltot/Project-3-Speech.git (fetch)
upstream        https://github.com/peraltot/Project-3-Speech.git (push)

```

Next, from within the your correct branch...


```
git pull upstream <your-origin-branch>
```
This Updates your branch from upstream

check all branch #'s to ensure all on same git#!
 
```
git branch -av
``` 

You will see: 
1. your master (6266a2b) matches remote/upstream/master(6266a2b).
2. your /remote/origin/master (6266a2b) matches remote/upstream/master(6266a2b).
These 3 repos (local master, upstream master and origin master) need to match.

```
git branch -av
* master                          6266a2b Update README.md
  remotes/origin/HEAD             -> origin/master
  remotes/origin/master           6266a2b Update README.md
  remotes/origin/textfile-working ead5671 added body-parser, jquery for  calls to fix /saved POST
  remotes/upstream/master         6266a2b Update README.md


```

Hope this helps!
How to implement blocking and following user functionality in node.js as backend ??
Tags: node, webdev, mean, career
Published: 2019-03-07 17:26:30

---
title: How to implement blocking and following user functionality in node.js as backend ??
published: true
description: How to implement blocking and following of users functionality using node.js backend ??
tags: node.js , web-dev, MEAN , career
---
Nevertheless, Lauren Coded
Tags: wecoded
Published: 2019-03-07 17:25:50

---
title: Nevertheless, Lauren Coded 
published: true
tags: shecoded
---

 <img src="https://thepracticaldev.s3.amazonaws.com/i/1yeiw43n8o3vowhelmmp.png" alt="source of image: https://blog.trello.com/women-who-code">

## I started to code in 2009 because...
It was fun! I had studied Astrophysics in my Undergrad but ran all around taking courses across Mechanical Engineering, Computer Science and Electrical Engineering Disciplines and I knew I wanted to do a job where I never had to do the same thing every day and could learn new things while getting paid to do so!.. In the end, software just felt like a good fit for that ;)

## I deserve credit for...
the attention I put into running backend code bases across multiple products, and focusing on design patterns and architectures which improve performance as well as always being a person my coworkers can turn to with questions because I always make sure to bring my best self while at work and be accessible within the community. I think a part of being a great engineer, is being open to communicate and learn something new, who knows? You might find a new and novel approach to your problem you would've never thought of! I also think patience and being kind with others will always yield a better design and development release cycle.

## I hope to see the tech community...
become more accessible to differing points of view and that means being inclusive to minorities of every race, sexual orientation and gender identity! I think we do ourselves a huge disservice when we keep tech at arm's length and tell others they don't fit the mold of what an engineer should look like, there is no mold. Just have passion and you will do fine! Be diligent and hardworking and you will go further, and let others in! Gatekeeping in all tech fields is one of the biggest issue, when people complain there are no good candidates I remind them how we have ostracized and alienated those with deep passion for engineering and learning and puzzle solving from following engineering due to sexual harrassment, homophobia, and telling everyone to fit into a box.
Nevertheless, Melissa Manousos Coded
Tags: wecoded
Published: 2019-03-07 16:49:20

---
title: Nevertheless, Melissa Manousos Coded 
published: true
tags: shecoded
---

I continued to code in 2019 because I enjoy it! I know I have a lot more to learn but I am enjoying the fun of the journey. 

I completed 3 of the 9 courses at Launch School and am on track to complete the 4th within the next week. I have also started co-hosting their Women's group to offer support to other women and non-binary folks within the program.

I hope to see my tech community embrace and uplift more folks who are under-represented: career changers, women and non-binary folx, people of color. With more perspectives, we built better things!
Nevertheless, Tori Coded
Tags: wecoded, jobhunt, bootcamp
Published: 2019-03-07 16:33:21

---
title: Nevertheless, Tori Coded 
published: true
tags: shecoded, jobhunt, bootcamp
---

## I continued to code in 2019 because...
I was determined to finish the online software engineering bootcamp I had started in April 2018. My original plan was to complete it in October, but due to a few different set backs, it had taken longer than expected. Nevertheless, I kept pushing through and remained optimistic. 

## I deserve credit for...
completing my bootcamp in early February 2019 after overcoming those aforementioned set backs. I have also been participating in the #100DaysOfCode challenge, and I've honestly been impressed with myself for how dedicated I have been to it. I love how much I've learned and accomplished through the first half of the challenge.

I have also recently begun the daunting chapter of job searching, which I am determined to remain positive through no matter what happens along the way. I can't even explain my excitement to start my first job as a software engineer. Making the very scary change to this career path from my previous one (athletic training), has been one of the greatest and most personally rewarding things I've done to date. 

## I hope to see my tech community... 
continuing to thrive and to always be kind to one another. One thing I've noticed about the tech community, on Twitter specifically, is that not every one is kind to one another. When I say this, I don't mean that people are disagreeing with other people, I mean people are outright calling each other names and being intentionally cruel. While I have not experienced this cruelty directly, I hope to see it occur less and less within the community.

## I just want to remind everyone... 
that there are **REAL** people on the other end of your directed comments online. Just because you can't physically see the damage you cause, doesn't mean it isn't happening. Strive to be kind, we are a community, *a family*. ❤️
Nevertheless, Elodie Coded
Tags: wecoded
Published: 2019-03-07 16:16:42

---
title: Nevertheless, Elodie Coded 
published: true
tags: shecoded
---

In 2001, I got to discover (in a quite random way) how to make a website and it was just a hobby at this time. 

Actually, while I was studying English and Spanish in college (and even earlier than that), I worked on my first pages with Front Page (I agree, not as awesome as VSCode!), but this is how it started.

Few years later and since my professional career looked like a dead-end; after a long research I did a coding bootcamp about 3 years ago. 

With new ways to write code (Git, new IDEs, Linux...), "thinking in code"; I found my purpose and every piece of the puzzle started to fit into each other.
  
18 years later after my first pages and lines of code, I can't believe how much technology and languages have evolved.

Now, I keep on working on a language I used to hate a long time ago - that I am loving more and more while almost everyone find it "outdated" (PHP), with new tools (Symfony, Composer, Symfony Components...) and that doesn't stop me to learn/discover other languages that I barely used until then.


## I continued to code in 2019 because...
-I wanted to
-I love creating things, and not just visual ones!
-I love keep on learning
-this is what I love doing!

## I deserve credit for...
-participating to several hackathons
-done some PRs for some open-source projects (including Hacktoberfest)
-building projects on my own and helping others (if/when they need help)

## I hope to see my developer/tech community...
-having more and more female developers
-more respectful and more honest towards each other (#buildupdevs)
-doing more workshops, meetups and events
Nevertheless, Elena Coded
Tags: wecoded
Published: 2019-03-07 16:12:37

---
title: Nevertheless, Elena Coded 
published: true
tags: shecoded
---

I wrote the first #shecoded post [in 2018](https://dev.to/ice_lenor/nevertheless-elena-coded--2i5n), and I liked the opportunity to share, so I'm sharing again.

## I continued to code in 2019 because...
2019 is my 11th year of coding professionally.
During these years, I did a lot! I built large systems from scratch, and small ones, done bugfixing in huge codebases almost my age, collected user requirements, argued with users:), wrote automated tests, didn't test enough and broke things, added monitoring, broke monitoring, mentored colleagues, grew junior developers, advocated for minorities in tech, led training, led teams, led projects, 
became a manager, then a developer again, then a manager, than a developer, built products alone and in a team, built and launched my own projects and charged for them.

I worked on products which a small number of users uses 24/7 and which millions of users use every day. Enterprise, e-commerce, SaaS and smartphone apps.

I continue to code because I like how I can create a product out of nothing. It costs me almost nothing, and I can do it alone, but hundreds, thousands, millions of people will find it useful.

## I deserve credit for...
- Writing [useful articles](http://smartpuffin.com) about software development 👩‍💻
- Running in-person trainings for my colleagues and helping to share the knowledge 👩‍🏫
- Launching 2 own projects 🥳

## I hope to see my tech community...
To become diverse and inclusive.
Nevertheless, Holly Coded
Tags: wecoded
Published: 2019-03-07 16:06:32

---
title: Nevertheless, Holly Coded 
published: true
tags: shecoded
---

## I continued to code in 2019 because...
It's the type of work that I'm passionate about. I couldn't imagine myself being any other kind of professional, and I'm loud about coding because I feel that it is so important for women in any male-dominated field to speak out about it and make our presence known. 

## I deserve credit for...
Launching a massive, multi-million dollar website redesign. I led the tech project team, did the requirements gathering, code reviews, code management, architecture design, and deliverable balancing. It was a very short timeline with a ton of deliverables, and together with my amazing (female) account manager and project manager, we delivered. It was close, but we did it!

## I hope to see my school/work/developer/tech community...
Encourage women to get involved in tech. Tech isn't something that you can't do just because you're a woman, and it's time that more women realized this. Give it a try! The worst that happens is that you don't like it. But maybe, just maybe, you'll find a new hobby or even a new career. We need you, and maybe you need tech, too.
My GDAL CLI snippets
Tags: gdal, gis
Published: 2019-03-07 15:05:17

---
title: My GDAL CLI snippets
published: true
description: 
tags: GDAL, GIS
---

## To crop a raster file according to a shapefile

```sh
gdalwarp -overwrite -s_srs EPSG:32649 -q -cutline shapefile.shp -of GTiff raw.tiff crop.tiff
```

## To merge several bands into a raster file

```sh
gdal_merge.py -o target.tiff -of GTiff -ps 10 10 -separate B1.tiff B2.tiff B3.tiff
```

Here `10 10` means 10 meters in the x-axis and 10 meters in the y-axis. If `-ps` is not specified, the spatial resolution of the first raster file will be considered to be the target resolution.

## To merge several files spatially

```sh
gdal_merge.py -o target.tiff -of GTiff TL.tiff BL.tiff TR.tiff BR.tiff
```

## To resample a raster file

```sh
gdal_translate -outsize 50 50 raw.jp2 target.jp2
```

Here `50 50` means 50% in x-axis, and 50% in y-axis.

---

## Appendix: Install GDAL for Python on Ubuntu

```sh
# Install gdal library
sudo apt-get install -y gdal-bin libgdal-dev
# gdal-bin is not necessary, but you will definitely need it to run the CLI commands above

# Export include path
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal

# Install the exact version of Python package
gdal-config --version | xargs -0 -I {} pip install gdal=={}
```
xerrors has less feature about trace's detail
Tags: go, golang2
Published: 2019-03-07 13:48:33

---
title: xerrors has less feature about trace's detail
published: true
description: Feedback for Go2 Proposal(Error Values)
tags: golang, golang2
---
This is feedback for Go 2 Proposal.
This is my opinion. if you has any opinions for proposals, please [feedback](https://go.googlesource.com/proposal/+/master/design/go2draft.md) your one.

[The proposal of Go 2 Error Values](https://go.googlesource.com/proposal/+/master/design/go2draft-error-values-overview.md) is looks good to me. Inspection and printing feature is simple and ease to use. but not enough to read error stacktrace.
Some case(i faced when i used [sentry](https://sentry.io/welcome/)), we want to read error stacktrace(ie. program counter, function name, line number...etc) to create structured error data. Implementation of this proposal("xerrors") provide Printer interface only which is used to print error.
This interface is focus on printing and formatting so we can't use it to read stacktrace. If i want to read stacktrace by using "xerrors", i must write [dirty code](https://gist.github.com/ques0942/d2e5e55780b08653adde602ffb247925).
If "xerrors" will reveals stacktrace or returns runtime.Frame, it will be very useful. so i support [this idea](https://gist.github.com/axw/247b6f69d2da016bb21a5eb1be44e611).
JSCD: You Can Never Have Too-Clean Code
Tags: beginners, webdev, productivity, rails
Published: 2019-03-07 13:29:04

---
title: JSCD: You Can Never Have Too-Clean Code
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/nl2hmoautgx8l562o0lv.jpg
tags: beginners, webdev, productivity, rails
series: Journal Of A Second-Career Dev
---

This week at [my new job](https://dev.to/msarit/the-non-cliche-guide-to-breaking-into-tech-coding-to-be-specific-4iol), I was tasked with creating a new feature for one of our web apps. Specifically, I had to "expose" some information from our database to the web app, not for immediate use, but in case this data was necessary down the line.

My task required me to dive deeeeeeep 🌊 into our codebase. There were so many methods, variable definitions, modules and models to investigate and step over - all to decide if the data I sought to uncover had already been queried elsewhere in our app. That's when the absolute importance of clean, well-written code hit me. 🧱

As a bootcamper, I remember how often I heard *"Name your variables, methods and functions intelligently"*. I admit, this is advice I didn't take seriously at first. After all, who else is reading the code for my kick-ass personal project? As long as I understand it right? However, in my opinion, that is one of the weaknesses of solo projects - we don't get to build those coding skills that enhance and promote collaboration. This is the main reason why, before landing my current job, I decided to get into opensource (starting with Dev.To - yay! 🎉). I needed to learn how to read and understand other people's code,  and get comfortable with coding with others.

Typically, large professional codebases require significant energy to understand the various constructs, data types and paradigms that are being implemented. Clean code ensures that the newbie developer isn't further burdened with figuring out what a variable refers to. 🤔 Clean code really makes software development easier.

---

**PS** This journal entry doesn't delve into what constitutes clean code. I do understand that "clean code" can be defined subjectively.
The Useful & Hidden '_' Command In IRB
Tags: ruby, rails, productivity
Published: 2019-03-07 13:07:04

---
title: The Useful & Hidden '_' Command In IRB
published: true
description: This article goes over the utility of the lesser known command '_' IRB command. This can boost your productivity in an unexpected way!
tags: ruby, rails, productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/3ktq4ung70yy7g6g699a.png
---

## Introduction (TLDR sorta)

As a developer, I am alway seeking for tools and tricks that allow me to be more efficient while working on projects. As a result, I've adopted some lesser known ruby interactive shell command. One of which is the underscore or `_`. I found that this command when applied can be super beneficial and boost your productivity!

The underscore simply gives you the return value of the last evaluation made in the console. I find this especially useful in the event I forget to assign the output of a block of code or when I perform a query via Rails that I’d rather not run again. Let me show you what I mean:

## Example Use Case
![Example](https://thepracticaldev.s3.amazonaws.com/i/l5u942ihb0m5dpxv7nws.png)

Above is a screenshot detailing an example use case. In that example, I evaluated a block of code with a 5-second pause (to simulate a slow operation) without assigning it to the variable animal. Nothing to worry about, you can just use the underscore to avoid having to execute that code again!

Another fairly common situation were you might benefit from using the `_` method is when you run a query in Rails... but forgot to assign it to a variable!

## Conclusion

The underscore is a useful tool to use when you are working in the ruby interactive shell. It may not seem like a lot of time to just re-run slow code… but it does add up!

What other kinds of hidden ruby tricks are there out? Please comment on this post if you know any and are in a charitable mood.
Music that is helping you get through your week
Tags: offtopic, fun, dev, discuss
Published: 2019-03-07 12:59:03

---
title: Music that is helping you get through your week
published: true
description: 
tags: #offtopic #fun #dev #discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/gf1l8jptc9mhx5qggg2r.jpg
---

I tend to like a lot of genres of music from classical, electronic, blues, pop, and all the way to metal.

So I'm kind of looking for new music to add to my playlists, but hopefully this will be a fun place to share what you like.

<hr>

<ol>
<li> What are you currently listening to and has helped you get through the week?</li>
<li> Any favorite artists/bands/albums that you would like to share, so others may experience them?</li>
</ol>

<hr> 

1. Pineapple Thief, The Joy Formidable, Periphery, Gris Original Soundtrack, and Transistor Original Soundtrack.
2. Artist: Pineapple Thief
   Album: Magnolia

Happy Sharing!
What's a webhook?
Tags: webdev, explainlikeimfive, beginners
Published: 2019-03-07 12:45:23

---
title: What's a webhook?
published: true
description: The very first BlackboardDev post where we cover webhooks.
tags: webdev,explainlikeimfive,beginners
---

Woot *(autocongratulations)*, my very first Dev.to post :tada:!!! 
The goal with **BlackboardDev** is to explain tech concepts - *from simple to more advanced* - in a playful and easy to grasp way.

Let's start simple in this post with webhooks!  
![BlackboardDev story: Webhook](https://thepracticaldev.s3.amazonaws.com/i/533fs4r3gtpmizpwncjo.png)
![Shitty Diagrams: WebHook](
https://thepracticaldev.s3.amazonaws.com/i/5z1buqwi0ok2nn3ew3ja.png)

Thanks for reading! Feel free to leave comments and suggestions (format, topics, anything really)

Cheers,
BlackboardDev
Which is the best option to deploy reactjs app and use a custom domain <name.dev>
Tags: discuss
Published: 2019-03-07 12:21:40

---
title: Which is the best option to deploy reactjs app and use a custom domain <name.dev>
published: true
tags: discuss
---

Hi! I'm new with this, I finished my personal portfolio built with reactjs and I want to deploy it and use a custom domain like name.dev. I do not care to pay some €  but I wat so find the best site to deploy my application. Thanxs
Any suggestion?

Thanks 😄
Empathizing with a developer
Tags: ux, webdev, career
Published: 2019-03-07 12:11:09

---
title: Empathizing with a developer
published: true
description: 
tags: #ux #webdev #career
---
The best way that we can empathize with a developer for me was to make the developer work. Yes, I’ve been a developer for some times before I decided to specialize in User Experience Design and now for my end of studies project, I still have to develop a website (last one maybe?).

I’ve almost completed the UX Design process which the final deliverable is the cliackable UI prototype that I’m trying to create. Before that, I’ve made a lo-fi clickable prototype and I was thinking about the tools I’m going to use. For example, we need a WYSIWYG (what you see is what you get) editor. Of course the developer can create one but we don’t the time for that and it’s actually a waste of time to do that anyway in the kind of project I’m working on. So before making the lo-fi prototype I have to decide which editor I’m going to use so I can remake it in the prototype to test it. The better way to test it though is to do it via the live demo of the editor. You can then test a lot of choices and choose which editor goes well with your project and has a better usability.

## I don’t care! You’re the developer!

![Steve Ballmer famous speech: developers! developers! developers!](https://cdn-images-1.medium.com/max/800/1*WeZlYd1Exr2JVup0MeSwaw.jpeg)

It’s easy to fall in this hole of hell where you just make the design and throw it to the developer. You have to empathize with the developer but what does that mean?

You have to know if the developer:

has the time to implement the features the way you present it (it can be much more complicated for the developer)
has the right skills to implement them (Don’t just throw some complex SVG animations to a developer who knows little about SVG animations)
And if it’s possible to make something that will satisfy the user needs, the business objectives and also that will make your developer less frustrated implementing your prototype. Why don’t we make their lives easier?

I know it’s a non idealistic way to work when adjusting yourself with the developer time and skills but it’s a more realistic one, where everyone can feel that they’ve been thought of and then everyone will do their best and surpass their limits.