teleren/devto huggingface dataset:
GitHub Organizations: How to SetUp and Use Wisely
Published: 2020-07-08 21:32:58

 While laying the ground work for our upcoming FOSS Event [BIT Summer Of Code](https://BITSoC.github.io), it appeared to me just how useful and important GitHub has become into organizing any and all events related to FOSS. And a major reason for this may be accredited to the [GitHub Organizations](https://git-scm.com/book/en/v2/GitHub-Managing-an-organization).

This is what makes GitHub a huge advancement over the basic Git VCS: its rich set of feature. As such, Organizations provide an upper-hand over the Single-User, Single-Account paradigm. Just from the abundance of Corporate Organizations showing up regularly on [this FOSS platform](https://github.com/collections/open-source-organizations), one may estimate how good of an organizational tool this feature is. 

The creation of a GitHub organization is rather trivial on the other hand. On your homepage at [GitHub](https://github.com), click on the the 'Create Organization' from the drop-down on top-left. ![Organization Create](https://dev-to-uploads.s3.amazonaws.com/i/v7nje1eo9zi8w0728jq0.png). 

Thereafter select either of the premium plans for the Organization at hand, although the Free Plan works brilliantly for a range of low to medium level intensive organizations. 

Thereby name your Organization as such and fill in a basic form asking for a contact email-id and a basic purpose of the Organization.

So, is that it? Yes. Pretty Much. You have an Organization for Yourself. 

However, an organization for a single person is no better than a Single Account. So, let us add some collaborators to manage this immense work load.

Move ahead to the 'People' section in the nav-bar for your new organization. 
` https://github.com/orgs/<your-organization>/people `

Here you can invite members to collaborate with you and assign them Membership Roles which you can customize as well further down the line:
* Owner : The one with all priviliges and who can modify others' membership roles. 
* Member : A customizable role granted as a General Contributor. 
* Billing Managers : Folks that manage the billing settings for Your Organization.
* Outside Collaborators : These are folks that make casually contribute to your Organization and make it into a Great Product. It is upon your wise decision to secure your data accordingly. 

> [DOCS](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/collaborating-with-groups-in-organizations)

For further wise usage, you can use Github Teams ` https://github.com/orgs/<your-organization>/teams ` for Seamless Communication relevant to the Organization, handle your Organization's software releases ` https://github.com/orgs/BITSoC/packages ` and even set up your workflow with Projects ` https://github.com/orgs/BITSoC/projects `.

Also be vary of the 'Settings' section since it upholds a variety of customizations to the way you use and maintain an Organization, be it to hold a FOSS event like [ours](https://BITSoC.github.io), have software release or just maintain a nice cluster of Developers for like-minded activities.
Creating an Auto Chess Stats Site (TFT focused) Part 1
Tags: react, typescript, nextjs, startup
Published: 2020-07-08 21:10:27

# The rise of AC Slayers
This series I will be blogging my journey through creating a TFT stats site. I want to document this so I can have a record of all the wins and pain points I face. I was on the fence about doing this blog series since I would have to write, edit and document all the things I do. It is time-consuming when I could be focusing on coding, but I figured this would be a great way for others and myself to see how this journey goes.

Let's begin!

## Initial thoughts
I initially wanted to create a website that will encompass the most popular AutoChess (AC) battlers, DoTA & Team Fight Tactics. Not a great idea to do for the MVP. So I pivoted and decided to focus on TFT for now. Riot offers an API for developers which you can find [here](https://developer.riotgames.com/). If you have an account with Riot Games you can log-in and see the different requests you can do. Pretty standard stuff.

## Design
Next, I thought about how a user would use this website. I need (tentative):
- Homepage
  - Logo
  - Input for username
  - Form Submit
- User Stats page
  - User info
  - Recent matches (placement, units, traits)
  - Common team traits
- Match info
  - Placement
  - Users
  - Units
  - Traits
 

## Stack
I originally started with React and was going to just do a SPA with react-router, but I pivoted here as well and went with [Next.js](https://nextjs.org/) instead.

Why? Next.js is a React Framework that does so much out of the box. And the biggest reason for me is SSR Speed.

So I run `yarn create next-app` fill in the prompts and voila! A Next app ready to go. CD into your directory and `yarn dev` to see it up and running.

## TypeScript
Next.js also offers TypeScript capabilities built into its framework. Create an empty tsconfig.json file in your root directory. Assuming you are still in the directory of your project `touch tsconfig.json` should get you there. Execute `yarn dev` and it will ask you to install some node modules and you will have TS with standard configs.

### [Part 2](https://dev.to/rembrandtreyes/getting-the-api-to-return-something-anything-ac-slayers-part-2-5c51)
Run the .NET Core SDK and Runtime from a Docker container
Tags: dotnet, docker
Published: 2020-07-08 21:04:23

---
title: Run the .NET Core SDK and Runtime from a Docker container
published: true
description: Run the .NET Core SDK and Runtime from a Docker container
tags: dotnet, docker
canonical_url: https://sha.ws/run-dotnet-in-docker-container.html
//cover_image: https://direct_url_to_image.jpg
---

## Overview

I run a lot of my tooling straight from Docker containers instead of installing them on my system.
Doing so helps me ensure I'm using the desired version(s) straight from the official maintainers, helps me keep my system tidy, and guarantees a consistent environment across machines.

I've started getting my feet wet with .NET Core in preparation for an upcoming project and noticed that neither Microsoft's documentation nor their [Docker Hub page for .NET Core](https://hub.docker.com/_/microsoft-dotnet-core) mention running the SDK or runtimes straight from the published images, so I've put together a simple wrapper to run the .NET Core SDK and Runtime from a Docker container:

[https://github.com/bshaw/dotnet-docker/](https://github.com/bshaw/dotnet-docker/).

The script uses the official [Microsoft .NET Core SDK image](https://hub.docker.com/_/microsoft-dotnet-core-sdk/) using the `3.1` tag (Debian 10).
It is based on (effectively forked from) the Docker Compose [Run docker-compose in a container](https://github.com/docker/compose/blob/1.25.4/script/run/run.sh) script, which properly handles volume mappings and various options based on the environment.

## Installation

Place the wrapper script in your path and made it executable:

```bash
sudo curl -L --fail https://raw.githubusercontent.com/bshaw/dotnet-docker/master/run.sh -o /usr/local/bin/dotnet
sudo chmod +x /usr/local/bin/dotnet
```

## Usage

Use the dotnet command as you would if it were installed locally:

```bash
❯ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.301
 Commit:    7feb845744

Runtime Environment:
 OS Name:     debian
 OS Version:  10
 OS Platform: Linux
 RID:         debian.10-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.301/

Host (useful for support):
  Version: 3.1.5
  Commit:  65cd789777

.NET Core SDKs installed:
  3.1.301 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
```

### TODO: Multi version support

The dotnet version is specified as a variable in the script - you can easily update the file on your system depending on your requirements.
I may also update the script to support multiple versions.
Feel free to send a pull request if you get to it before I do.
How do you use k3s?
Tags: kubernetes, k3s, raspberrypi, discuss
Published: 2020-07-08 21:03:23

I must say I am a bit overwhelmed by the many posts where folks talk about how they used k3s to experiment and play with kubernetes.

I actually could find very few posts that talk about how k3s is used to do something useful beyond experimenting...

Anyone can help me out? What's the coolest and most useful use of k3s that you have seen?
Reagent 101 / why Form 2 components need to return a function
Tags: clojure, react, tutorial
Published: 2020-07-08 21:01:54

Let's take a look at a canonical example of a Form 2 component.

```clojure
(defn app-view []
  (let [counter (r/atom 0)] ;; setup
    (fn [] ;; render fn
      [:div
       [:p @counter]
       [:button
        {:on-click
         (fn [e]
           (swap! counter inc))}
        "Increment!"]])))
```

We initialize some local state and return a function that returns some Hiccup. On click, we would see the correct behavior: the counter incrementing.

Imagine if we didn't return that inner function. What would happen?

```clojure
(defn app-view [] ;; render fn
  (let [counter (r/atom 0)] ;; setup
    [:div
     [:p @counter]
     [:button
      {:on-click
       (fn [e]
         (swap! counter inc))}
      "Increment!"]]))
```

The counter feature would break. Remember: in a Form 2 component, we have an outer function that is run only once and an inner function that is run every time the component re-renders.

When we don't have an inner function, the outer function assumes the role of a render function. 

In the example above, this means that `app-view` gets re-run every time the component renders. Do you understand the problem now? The component-state is getting re-created with every render. We get a new counter r/atom on each re-render.

> If a component does not re-render, it may be because you're re-creating state on every re-render.

Warmly,
DH
who is senior developer?
Tags: career, video
Published: 2020-07-25 20:54:36

---
title: who is senior developer?
published: true
date: 2020-07-08 21:00:14 UTC
tags: career,video
canonical_url: https://www.notonlycode.org/video-who-is-senior-developer/
---

{% youtube FS-EWGohUBo %}


This is first video in my new series about how to become a senior developer. In the video I'm talking about:

- where is senior developer position on the typical career ladder
- what is experience required to be a senior developer
- what are responsibilities of senior developers

📚 Resources:

- [https://www.gov.uk/guidance/software-developer](https://www.gov.uk/guidance/software-developer) - career ladder from UK Gov
- [https://levels.fyi](https://levels.fyi) - comparison of levels (and salaries) among large tech companies
Self-hosted Geo to Timezone service
Tags: docker, privacy, api, selfhosted
Published: 2020-07-08 20:30:36

For the [VALIS](https://meetvalis.com) project I needed a geo to timezone service, specifically to pick up a reasonable time to send chat messages. 

There are a [few hosted services](https://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates) that can do that for you, but I believe that privacy is a feature, and I am not comfortable with sharing location data with 3rd party services.

A geo to timezone service is a simple service to implement, especially since the heavy stuff 💪 has been already implemented by better human beings 🙏 (the link above also lists the libraries).

And so here it is: [geo2tz](https://github.com/noandrea/geo2tz)

Here is how to run and how to interact with it :

{% asciinema 346197 %}

> if you don't see the embedded video, follow this [link](https://asciinema.org/a/346197)

ps. docker images are hosted on [gcr](https://github.com/noandrea/geo2tz/pkgs/container/geo2tz)
My first ASP.NET Core MVC app
Tags: softwaredevelopment, web
Published: 2024-02-28 09:30:38

---
title: My first ASP.NET Core MVC app
published: true
date: 2020-07-08 20:23:50 UTC
tags: softwaredevelopment,web
canonical_url: 
---

As you might have noticed I created a Windows application to calculate time span between two dates [Event Timing](http://stipe.xyz/my-work/). Since I’m not always sitting by my Windows PC, I got the need to have this little calculator app available on the web. This evening the web app went from idea to production.  
  
The most important motivation for this application was to quickly calculate how old is my baby in days. For this my Event Timing app worked great, with notifications, live tiles and all that, but with one major limitation that it was only available on Windows. Now since I’m spending more time with the baby, I’m not that much by the PC anymore. My phone is always near and I concluded if my application was available as a web app I could easily check the baby’s age in days wherever I am. This and my long time desire to try make an ASP.NET web application made me spend a few hours this evening to create this application.

Known limitations:

- It doesn’t support different time zones. It always calculates based on UTC time.
- Date format is not based on user’s region. Date format in the input field is formatted by users browser. The date in calculated page is formated in dd/MM/yyyy format as I think most of the people use that format.
I created a Twitter bot to get Elon Musk to follow me
Published: 2020-07-08 20:21:15

Due to boredom at work, I thought of an idea. 

What if I tweeted everyday something like 
> "Day XXX, has [@ElonMusk](https://twitter.com/@ElonMusk) followed me yet?" 

If he actually followed me, that would be amazing, and I could write it on my resume.

So off I went. 

## Step 1: Create Twitter developer account
I created a new twitter account called [@ElonMuskFan8](https://twitter.com/ElonMuskFan8). To grab Elon's interest, I made my profile a picture of him next to Mars. Then I got API keys from Twitter's [developer site](https://developer.twitter.com/en/portal/dashboard). One gotcha I found was, I had to enable write access and THEN regenerate my API keys and secrets or else I'd get 401 errors when trying to POST a tweet.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8hlty56dew3zmfucpqqb.png)

## Step 2: Create long-running process that sends one tweet a day.
I setup a simple nodeJS project, then installed twitter and express. My app would simply start a server and run an interval, checking each minute if it was 9:30 am. If so, I would send a tweet that said:

> Day XX: Has [@ElonMusk](https://twitter.com/@ElonMusk)  followed me yet?

## Step 3: Deploy my app.
For serving my app I chose Heroku. I followed their instructions [here](https://devcenter.heroku.com/articles/getting-started-with-nodejs) and was able to deploy my app within 20 minutes. I also stored my API secrets in heroku's environment variables so I don't expose them in my Github repo.

## Step 4: Wait
Now we wait and see if Elon Musk ever replies or follows back. It may take months or years, but we don't care since the bot is taking care of it for us.


If you like these types of posts let me know!

My code: https://github.com/qikevinjkw/elonmuskfan
Solving the Fibonacci Sequence
Tags: go, algorithms, challenge, discuss
Published: 2020-07-08 20:16:32

---
title: Solving the Fibonacci Sequence
published: true
description: Solving the fibonacci sequence in the shortest amount of code
tags: #go, #algorithms, #challenge, #discuss
cover_image: https://i.imgur.com/QaaTimS.png
---

I started Jon Calhoun's <a href='https://algorithmswithgo.com/'>Algorithms With Go</a> course this week, and I have to say it's very enjoyable. I don't know whether it's the course content or getting my hands dirty writing Go Code but it really is a great course.

Anyhoo - One of the algorithms included in the course is the calculation of the Fibonacci sequence.

The Fibonacci sequence is defined as 

<img src='https://wikimedia.org/api/rest_v1/media/math/render/svg/0fff1a1716fcc169546079870357f92757ade5fa'/>

or

F(n) = F(n-1) + F(n-2)


I wrote the following solution (here's one I made earlier), but it's bothering me because I **feel** like it could be written in even less lines of code. Anyone care to try? 
I'm not expecting Go, feel free to write it in any language you see fit, I'm just curious how compact the solution to a challenge like this can be. What better community to ask than the dev.to community?

```
func Fibonacci(n int) int {
	if n < 1 {
		return 0
	}
	if n < 3 {
		return 1
	}
	return Fibonacci(n-1) + Fibonacci(n-2)
}
```
Django Files Explained
Published: 2020-07-08 20:09:59

A skeleton of a django project looks:
(Based on our django [Django-Starter Template](https://github.com/ChrisAchinga/django-starter-guide))

This is just a summary of the documentation on https://docs.djangoproject.com/ and a continuation of our "Getting Started with Django" article.

```shell
├── manage.py
├── myapp
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   │   └── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
└── _projectroot
    ├── asgi.py
    ├── __init__.py
    ├── __pycache__
    │   ├── __init__.cpython-38.pyc
    │   ├── settings.cpython-38.pyc
    │   ├── urls.cpython-38.pyc
    │   └── wsgi.cpython-38.pyc
    ├── settings.py
    ├── urls.py
    └── wsgi.py
```

## These project files are:

1. The outer `_projectroot/` root directory is a container for your project. The folder can be renamed.

2. `manage.py`: A command-line utility that lets you interact with this Django project in various ways. Do not touch this file.

3. The inner `_projectroot/` directory is the actual Python package for your project. Its name is the Python package name you’ll need to use to import anything inside it (e.g. `_projectroot.urls`).

4. `_projectroot/__init__.py`: An empty file that tells Python that this directory should be considered a Python package.

5. `_projectroot/settings.py`: Settings/configuration for this Django project.

6. `_projectroot/urls.py`: The URL declarations for this Django project; a “table of contents” of your Django-powered site.

7. `_projectroot/asgi.py`: An entry-point for ASGI-compatible web servers to serve your project.

8. `_projectroot/wsgi.py`: An entry-point for WSGI-compatible web servers to serve your project.


## The App files

1. `admin.py`: Registering your models here for them to be manipulated on the django admin

2. `apps.py`: Contains the app configuration code

3. `models.py`: Define your models here. These are the tables used for storing data and defining their relations

4. `tests.py`: Writing tests for the app

5. `views`: Defining data to be rendered on the templates
Help with React Router 404 within React Transition Group
Tags: react
Published: 2020-07-08 19:53:19

I'm having difficulty implementing a 404 Component combining React Router with React Transition Group. My "NoMatch" component will not get rendered while inside a CSSTranisitionGroup. I have tried moving the CSST Group to within the Routes of Switch, but this doesn't seem to solve the issue. How can I successfully create a 404 page using CSST Group? Please see this attached Sandbox as well: [Sandbox Link](https://codesandbox.io/s/lucid-shamir-5b42y?file=/src/App.js)

```
import React from "react";
import { BrowserRouter, Route, Switch, NavLink } from "react-router-dom";
import { CSSTransition } from "react-transition-group";
import "./styles.css";
import Home from "./Home";
import About from "./About";
import Contact from "./Contact";
import NoMatch from "./NoMatch";

const Data = {
  routes: [
    {
      path: "/",
      exact: true,
      title: "Home",
      navTitle: "Home",
      contentClass: "home",
      Component: Home
    },
    {
      path: "/about",
      exact: true,
      title: "About",
      navTitle: "About",
      contentClass: "about",
      Component: About
    },
    {
      path: "/contact",
      exact: true,
      title: "Contact",
      navTitle: "Contact",
      contentClass: "contact",
      Component: Contact
    }
  ]
};

export default function App() {
  return (
    <div className="App">
      <BrowserRouter>
        <nav>
          <ul>
            {Data["routes"].map((route, i) => (
              <li key={i}>
                <NavLink
                  className={"nav-link"}
                  exact={route["exact"]}
                  to={route["path"]}
                >
                  {route["navTitle"]}
                </NavLink>
              </li>
            ))}
          </ul>
        </nav>

        {Data["routes"].map((route, i) => (
          <Route key={i} exact path={route.path}>
            {({ match }) => (
              <CSSTransition
                in={match != null}
                timeout={1000}
                classNames={`${route.contentClass} page`}
                unmountOnExit
              >
                <Switch>
                  <Route render={() => <route.Component {...route} />} />
                  <Route component={NoMatch} />
                </Switch>
              </CSSTransition>
            )}
          </Route>
        ))}
      </BrowserRouter>
    </div>
  );
}

```
Power to the Enterprise – Building Bots with Power Virtual Agents 
Tags: ama, powerfuldevs, azure, powerplatform
Published: 2020-07-08 19:36:41

--- 
title: Power to the Enterprise – Building Bots with Power Virtual Agents 
published: true
description: In this session, LaBrina Loving will walk you through how both low-code and high-code developers can work together to build bots. 
tags: ama, powerfuldevs, azure, powerplatform 
--- 
<hr /> 
 
![Speaker Card](https://dev-to-uploads.s3.amazonaws.com/i/aoab2e0u80ejn357od35.png)

#### #PowerfulDevs Conference 
  
`RSVP HERE BY JULY 15:` 
[https://aka.ms/powerfuldevsconf](https://aka.ms/powerfuldevsconf) 
  
The [Powerful DEVs Conference](https://aka.ms/powerfuldevsconf) is the first virtual conference of its kind. We will showcase how developers can leverage the Power Platform to build applications faster and with far less effort. Connect with industry-recognized ProDev influencers, Microsoft Cloud Advocates, trusted and diverse community leaders, and members of the Power Platform Team. 
  
`BOOKMARK THIS FOR RESOURCES AND DISCUSSION WITH SPEAKERS`  
{% link https://dev.to/azure/powerfuldevs-conference-join-us-on-july-15th-online-fe3 %} 
 
Revisit this page during the event to engage in live (and post-event) discussions on those topics with both speakers and community. The speakers will be here for a live Q&A for at least 30 minutes immediately after their session concludes. After the event, come back to find additional slides, videos, and resources for this session. 
  
<hr/> 
  
## About This Session: 
  
`July 15, 2020: 12:00 PDT - 12:25 PDT` 
  
Power Virtual Agents empowers teams to easily create powerful bots using a guided, no-code graphical interface. It also allows users to add custom skills built with pro-code tools. In this session, I will walk though how both low-code and pro-code developers can work together to build bots. I will discuss the software development lifecycle for bots with Power Virtual Agent and key points to consider. 
  
## About the Speaker: 
  
LaBrina Loving is a Senior Engineer @ Microsoft focusing on Azure for ISV's and Startups. Follow [@chixcancode](https://twitter.com/chixcancode) on Twitter. 

Additional Resources: [aka.ms/powerbotframework](https://aka.ms/PowerBotFramework?WT.mc.id=events_powerfuldevs-blog-<chixcancode>)