teleren/devto huggingface dataset:
Connect Your Home to the Cloud with Tailscale
Tags: selfhost, wireguard, vpn, cloud
Published: 2020-08-24 16:45:09

---
canonical_url: "https://www.joshkasuboski.com/posts/connect-home-cloud-tailscale/"
---
I set up a Raspberry Pi kubernetes cluster to be accessible from the internet without configuring a port-forward on my router.

## Tailscale
[Tailscale](https://tailscale.com/) will create a private network using [Wireguard](https://www.wireguard.com/). Wireguard isn't really that difficult to configure on its own, but you do have to manually generate and distribute keys. Tailscale will take care of that for you and they also have some [fallbacks](https://tailscale.com/blog/how-nat-traversal-works/) for difficult networks. It doesn't look like any of my nodes are using a fallback option based on the dashboard.

Setting up Tailscale is as easy as installing it and running `tailscale up`. Until recently, this required you to login interactively. Tailscale now supports [pre-authenticated](https://tailscale.com/kb/1068/acl-tags#pre-authenticated-keys) keys which means you can automate the setup.

## Installing on Raspberry PIs
I made [kasuboski/tailscale-install](https://github.com/kasuboski/tailscale-install) to automate the installation and start of Tailscale on Raspberry PIs. I plan to expand it to work on more varied platforms in the future.

It's a [PyInfra deploy](https://pyinfra.com/) that basically just adds the package and runs `tailscale up` with a key sourced from the environment. I was able to add my Raspberry Pi cluster to the network in around 5 minutes, using this.

Really in one command `pyinfra pi1,pi2,pi3 install.py`

## Exposing to the internet
My cluster ingress is now slightly different than described [here](https://www.joshkasuboski.com/posts/home-k8s-raspberry-update/). Traffic from Linode now goes directly to the Kubernetes nodes on the port exposed by the nginx-ingress controller. This just removes the extra hop that was initially an internal haproxy running on a different Raspberry Pi.
a tech talk: guy on stage talks about bitcoin and blockchain then it caught everyone interest
Tags: blockchain, bitcoin, meme
Published: 2020-08-24 16:27:01

I am ok with the blockchain solution if it can solve a problem significantly. 

In some meetings and tech talks, presenter talks about blockchain, then it caught everyone interest. At the end of the talk, it just contributes absolutely nothing except creating awareness of bitcoin and blockchain to the audience.

https://thecorrespondent.com/655/blockchain-the-amazing-solution-for-almost-nothing/86649455475-f933fe63
How to use GitHub Actions with your GPU
Tags: machinelearning, git, tutorial, devops
Published: 2020-08-24 16:23:52

Tools like GitHub Actions and GitLab CI automate repetitive aspects of software development- and they can also automate machine learning tasks like model training, testing, and reporting. By default, these tools provide CPUs for running workflows. 

This tutorial will show you how to set up a GPU (on-premise or cloud) as a self-hosted runner using the CML Docker container, which comes ready with CUDA drivers and software to run GitHub Actions and GitLab CI workflows! It's part of a series of MLOps tutorials I've been making. Enjoy!

{% youtube rVq-SCNyxVc %}
Struggling with motivation in programming
Tags: motivation, programming, opensource
Published: 2020-09-08 20:49:49

---
title: Struggling with motivation in programming
published: true
date: 2020-08-24 16:00:00 UTC
tags: motivation, programming, opensource
canonical_url: https://blog.merzlabs.com/posts/motivation-and-programming/
---

# Staying motivated is sometimes hard

Recently I thought a lot about motivation for programming work. I get the feeling that motivation plays a big role on how I work and especially in open source. Motivation seems to affect how I enjoy work, how good the result may be and how fast I find solutions for tricky problems.

## Motivation and Open Source

For me motivation is especially critical for open source work. I get no money or deadline for open source stuff. It’s completely up to me when I take the time to work on or do nothing for a while. That’s why I need a lot of motivation to do it. Big parts of open source work are not that fun: triageing issues, reviewing complex pull request, fixing complicated bugs, reproduce issues etc. If it’s not fun and nobody pays or expects me to do it, why am I doing this anyway? Those are some of the reasons why I postpone some open source stuff.

## “Working In Public”

I just started reading the book “Working in Public - The making and maintenance of open source software” by Nadia Eghbal. I came across this quote:

> “Creation is an intrinsic motivator, maintenance usually requires extrinsic motivation”

- @BALUPTON. via isaacs/github

This quote really sums it up in a simple way. I enjoy programming (and work in general) the most when I can create new shiny things that I like and see value in. Working for long stretches on bug fixes and stuff that is less interesting is really hard for me personally.

I like to create new features and projects from scratch with new technologies and ideas. If you can see your success quickly while working and you move forward fast this keeps your motivation going. Seeing pieces come together and people liking your work creates **intrinsic motivation** because you can see your impact of work and therefore you like to work on this because it is fun.

Working on complex stuff where you need to consider 1000 different things, not knowing all moving parts and dealing with issues all the time, needs a lot of discipline and perseverance. If you are stuck on something for a long time it’s easy to loose motivation and start procrastination. Finishing work requires external motivators like people waiting for the outcome of your work or you getting paid to spend this time on stuff that is not really fun.

## Summary

Motivation is tricky, programming should be fun. Programming and creating new things is such a nice thing that can make me really happy. But a lot of programming at work or in open source is just not fun (maintenance). **Possibly the best thing we can do as programmers is to find a good balance between creation and maintenance to get just the right amount of motivation to keep on finding joy in what we do.**
Create Your First Website at www.amberit.org hosting
Tags: webdev, tutorial, codenewbie, beginners
Published: 2020-08-24 15:59:51

Creating Your Website
With our hosting system, There are three ways to create content for your website. Each has its advantages and disadvantages. Here is a short summary of all three options: more info: https://www.amberit.org/k1/create-your-first-website-at-www-amberit-org-hosting/ 

Follow us on twitter: https://twitter.com/amberit_org
Kingsley Hendrickse: Sushi, Crystal, and Blockchain
Published: 2020-08-24 15:56:27

This is an interview with Kingsley Hendrickse, who is one of the lead developers on Sushi Chain. We talk about his programming journey, his interest in blockchain, and his work on sushi chain. Please enjoy my conversation with Kingsley.

http://podcast.chicagocrystal.org/1030945/5126407-kingsley-hendrickse-sushi-crystal-and-blockchain

https://youtu.be/TmFO8Vy1AW8
What is the Micro Frontend?
Tags: discuss, webdev, architecture
Published: 2020-08-24 15:51:21

---
title: What is the Micro Frontend?
published: true
description: 
tags: discuss, webdev, architecture
//cover_image: https://direct_url_to_image.jpg
---
Today I heard Micro Frontends term. What is the idea behind Micro Frontends? Is the monorepo development approach in close correlation with Micro Frontends?
Authenticating APIs with Cognito
Tags: security, aws, serverless
Published: 2020-08-24 15:46:20

The world is changing fast.  It feels like the whole world is shifting towards standards like GraphQL.  API Gateway isn't the only way to host an API.  I have a feeling that AppSync is rising as a possible serverless API host.  Is there a future proof way of authenticating today?

**Authentication Methods**

Let's quickly list the possible authentication types.

1. JSON Web Token (JWT)
1. OAuth 2.0
1. OpenID (OIDC)
1. API Gateway API Key
1. AWS Lambda Authorizer
1. Identity and Access Management (IAM)
1. Cognito User Pool

This list answers a question like "How does a particular API authenticate a user?"

**Serverless API Types**

Let's also list the types of serverless APIs.  The popular pattern of API Gateway REST + Lambda isn't the only way anymore.  There's a shift.

1. AppSync
1. API Gateway HTTP
1. API Gateway REST

This list answers a question like "What serverless API host serves a particular API on the Internet?"

**Future Proof**

There's uncertainty in what users may demand.  So there is implied uncertainty in how to offer services to users.  The serverless wagon hasn't fallen off the trail just yet.  There is momentum in the resource sharing model that a serverless model offers.  Is there a future proof approach?

I like any approach that is flexible.  AWS Cognito is a point of leverage for flexibility.  Here's why I believe Cognito can help future proof. Cognito can generate JWT tokens - [API Gateway accepts](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html) them.  Cognito can generate OpenID OIDC tokens - [AppSync accepts](https://docs.aws.amazon.com/appsync/latest/devguide/security.html) them.

**Nifty Approaches**

Let's not forget to discuss some of the nifty new things.  Consider the passwordless login.  Now I'm not thinking about biometrics. I'm simply referring to logging in without a password.  Here's the approach: the user asks for a temporary login to be sent to something the user has.  Like an exact email address.  Or a specific phone number.  The user authenticates with the temporary login.  This is really nifty!  It's also an example of shift that wasn't predictable.  Which is why a flexible approach to authentication has many benefits, one of which is simplifying adaption to future users.
Markdown - Getting Started
Tags: markdown, language
Published: 2020-08-24 15:44:43

---
title: Markdown - Getting Started
published: true
description: Describes markdown basics 
tags: Markdown, language
//cover_image: https://direct_url_to_image.jpg
---

![MarkDown](https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Markdown-mark.svg/1200px-Markdown-mark.svg.png)  

Developers are now playing with lots of languages to make the web a better place to view. [Markdown](https://en.wikipedia.org/wiki/Markdown) is the language, used by developers of various interest to make the [github](github.com) a better place.

####History of Markdown
>A plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz. Often used for formatting readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. 

___

####Pros
* Provides **semantic meaning** in a simple way 
* Easy to learn ,implement and quick
* Readability 
* Platform-agnostic 

___

Let's learn Markdown and for those who know already, refresh!!!  

Start with **text**  

1. **Bold**  enclose text with double asterisk (**) on both sides
2. _italic_ enclose text with (_) on both sides
3. ~~strikethrough~~ enclose text with double tilde (~~) on both sides

___

Let's see about #######headers

There are six headers ranging from header1 larger size to header6 smallest header. Each header is preceedded with equal number of hash/number sign(#)

Example:-
>#heading1
>##heading2
>###heading3
>####heading4
>#####heading5
>######heading6

___

To show an **image**

Exclamation mark (!) followed by Any text related to image enclosed in square brackets [image-text] followed by image url enclosed in parenthesis (image-url.jpg)

![Orangecat](http://icons.iconarchive.com/icons/google/noto-emoji-animals-nature/256/22221-cat-icon.png)

___

**Link** is similar to _images_

Place a text to show enclosed in square brackets [view-text] followed by website url enclosed in parenthesis (web-url)


[Learn Markdown Basics](www.markdowntutorial.com)

___

**Block-quotes** - Attention seeker :)  

>Curiosity has its own reason for existing. 

________
Are you curious on Markdown language checkout [this](www.markdowntutorial.com), a practical approach towards markdown.
One year of working from home with kid and wife
Tags: remote, wfh, productivity
Published: 2020-08-24 15:39:15

What I do to enjoy my life when working from home. Tips are tightly coupled to each other:

- Work six hours per four days a week or less
- Invest more time and energy in family
- Take a day off if I want or need it
- Talk to people I like. Simply say "thanks for X"
- Make two hour break in case of distractions. Preferably go outside.
- Start workday after siesta if the morning is messy
- Get a job which requires a progress and results instead of time tracking and Slack presence 9-to-5
- Document progress in areas of life
- Reward myself for accomplishments
- Do more, consume (read, watch, listen) less
- Sometimes work ten to twelve hours per day
- Do something for fun and learning
- Exercise yoga each morning. Preferably without interruptions (wake up one hour earlier than son and wife)
- Exercise through the day
- Do breaks each half of hour (pomodoro)
Install Apache Kafka on CentOS
Tags: kafka, centos
Published: 2020-08-24 15:39:08

---
title: Install Apache Kafka on CentOS
published: true
description: 
tags: Kafka, CentOS
//cover_image: https://direct_url_to_image.jpg
---

How to install apache Kafka on centos 7.
1. Prerequisite.
2. Download the Kafka package.
3. Create an OS service.

#1. Prerequisite
   Make sure your OS has JAVA and Scala.
Following this command to chack a JAVA installed.
``` 
java -version 
```
Output should be 
```
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+11)
OpenJDK 64-Bit Server VM (build 11.0.8+11, mixed mode)
```

if not or your machine hasn't JDK
```
yum update -y
sudo yum install java-1.8.0-openjdk -y
```

Scala
```
wget http://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.rpm

sudo yum install scala-2.11.8.rpm -y
```

#2. Download the Kafka package.
```
wget https://downloads.apache.org/kafka/2.6.0/kafka_2.13-2.6.0.tgz -O /opt/kafka_2.13-2.6.0.tgz

tar -xvf /opt/kafka_2.13-2.6.0.tgz

ln -s /opt/kafka_2.13-2.6.0 /opt/kafka

useradd kafka
chown -R kafka:kafka /opt/kafka*
```

#3. Create an OS service.
###3.1 Create zookeeper service.
Create service flie "zookeeper.service" in /etc/systemd/system/
```
[Unit] 
Description=zookeeper 
After=syslog.target network.target 
[Service] 
Type=simple 
User=kafka 
Group=kafka 
ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties
ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh 
[Install] 
WantedBy=multi-user.target
```

###3.2 Create Kafka service.
Create file "kafka.service" in /etc/systemd/system/
```
[Unit] 
Description=Apache Kafka 
Requires=zookeeper.service 
After=zookeeper.service 
[Service] 
Type=simple 
User=kafka 
Group=kafka 
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties 
ExecStop=/opt/kafka/bin/kafka-server-stop.sh 
[Install] 
WantedBy=multi-user.target
```

###3.3 Enable and start service
```
sudo systemctl daemon-reload
sudo systemctl enable zookeeper.service
sudo systemctl enable kafka.service
sudo systemctl start zookeeper.service
sudo systemctl start kafka.service
```
Prints a specific area/element of your html page for any frontend framework
Tags: html, javascript, css, uiweekly
Published: 2020-08-24 15:37:43

# Welcome to ink-html!

<p align="center">
    <img width="200"  src="http://www.myiconfinder.com/uploads/iconsets/256-256-d946229cc05198d4c132c8f351f2b045.png" />
    <br />
  <img width="300" src="https://miro.medium.com/max/3728/1*7zccGWE4o5LmxegijjK_xQ.png"/>
</p>

**Prints a specific area/element of your html page** for any frontend framework

 - [x] Form Input Values
 - [x] CSS @media print
 - [x] Popup [Options](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features)

## Installation

```bash
npm install ink-html
```
or
```bash
yarn add ink-html
```

## CDN
```html
  <script src="https://unpkg.com/ink-html/dist/index.js"></script>
```

## Usage

```javascript
import print from 'ink-html'
// const print = inkHtml // for CDN

// js
print(window.querySelector('#printable'))
// Vue.js
print(this.$refs.printable.$el)
```

> **Join and support our Community** <br />
> Web and Mobile Developers PH <br />
> [ [Facebook Page](https://fb.com/webmobile.ph) | [Group](https://fb.com/groups/webmobile.ph/) ]

# *Join and support our Community* <br /> **Web and Mobile Developers PH** <br/> [ [Facebook Page](https://fb.com/webmobile.ph) | [Group](https://fb.com/groups/webmobile.ph/) ]
#30DaysOfCJS: Building for Budgets
Tags: community, javascript, performance, webassembly
Published: 2020-08-24 15:37:40

---
title: #30DaysOfCJS: Building for Budgets
published: true
description: #30DaysOfCJS Day 23, Building for Budgets
tags: community, javascript, performance, wasm
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/0uvduakcq3wjr6j7oxb6.png
series: 30DaysOfCJS
---

*This is a follow up post for Day 23 of* **#30DaysOfCJS**, *learn more about* **#30DaysOfCJS** *here* {% link jimcalliu/30daysofcjs-1jd3 %}

**Building for Budgets | Aaron Turner | CascadiaJS 2019**

If you'd like to watch the talk, here is the Youtube link.
{% youtube CYVs9hllqZY%}

Further readings:
- [Slides](https://docs.google.com/presentation/d/1S4vzn3FUMF2kT6GLaipjsb4pxmdPP14P3MVtFDEpXo4/edit?usp=sharing)
- [Wasmboy](https://awesomeopensource.com/project/torch2424/wasmboy)
- [Wasm by example](https://github.com/torch2424/wasm-by-example)
Deploying React app using AWS Amplify with CI/CD pipeline setup
Tags: react, aws, amplify, devops
Published: 2020-08-24 15:24:45

If you've recently started with React or have been doing react for some time but wondering how to Set-up CI/CD pipeline and deploy the application then you are in for a treat.
We'll be creating and deploying a React application using AWS Amplify with CI/CD pipeline setup. To get started, we need to create a react application first. To speed things up, we'll use CRA(Create React App) to quickly generate a react application template. So to create our application considering you've CRA already installed type the following command in your terminal

```
create-react-app my-app
``` 

If you don't have CRA installed and don't want to then we can simply use npx 

```
npx create-react-app my-app
``` 
Now, it will take a couple of minutes to complete generating the boiler-plate till we quickly create a new repo on GitHub/GitLab whatever suits you.
Once done creating the repo and boiler-plate has been generated we can navigate into our my-app folder and CRA auto-initializes git and creates .gitignore too for our ease. Now we simply need to grab the repo-link and add it as origin in our app.

```
cd my-app
git remote add origin git@github.com:gituser/projectname.git
git push origin -u origin master
``` 
Now, we're done with creating our app and pushing the code to gitHub. Now, we can finally use AWS Amplify to connect to our git repository and deploy the application. So to get started, Head into your AWS Console and search for Amplify. You'll be presented with a similar pop-up as

![amplify-1.JPG](https://cdn.hashnode.com/res/hashnode/image/upload/v1597758623405/kbmERJ8jT.jpeg)

click on the pop-up and you'll be redirected to Amplify Homepage. Now, On the left side navbar click on all apps and you'll be presented with something similar as 

![amplify-3.JPG](https://cdn.hashnode.com/res/hashnode/image/upload/v1597758800398/FRC5tKsv0.jpeg)

Now, on the right-top, click on connect app, you'll be presented something similar to

![amplify-4.JPG](https://cdn.hashnode.com/res/hashnode/image/upload/v1597758871351/IzlsZBC1L.jpeg)
Choose your provider. In my case i'm using GitHub but feel free to use any of the mentioned options and click next. Once you click next, you'll be presented with authentication screen from github asking you to allow few permissions. Once you complete authentication, you'll be able to select your git repository to connect with AWS Amplify and also will be able to select the branch which you want to use as trigger when the new code is pushed upon. I'll leave the master branch which is default.

![amplify-6.JPG](https://cdn.hashnode.com/res/hashnode/image/upload/v1597759062646/6QnXD926f.jpeg)

Then click next -> next -> Save & Deploy. Now Amplify will start building and after a couple of minutes you'll be presented with the deployed app link.
If you modify your code and push it into the master branch, it will re-build and re-deploy your app automatically.

In the future article i'll be guiding you through how to connect the react app with your own domain.

> Thanks For Reading !!
What are you planning to make for "Hacktober Fest 2020"? 👩🏻‍💻🚀
Tags: watercooler, discuss
Published: 2020-08-24 15:23:08

---
title: What are you planning to make for "Hacktober Fest 2020"? 👩🏻‍💻🚀
published: true
description: Use this post to share your idea, get it tested, and ask people to join your team. 😉
tags: watercooler, discuss
---

Hey all 👋 !

Do you, folks have any plans for Hacktober Fest? 

Use this post to share your idea, get it tested, and ask people to join your team. 😉
![](https://media.giphy.com/media/3oEdv5n72QTIovDSZG/giphy.gif)

------
Btw Team XenoX is also planning to ship our two Open Source project this October.

- ***[Caligator](https://github.com/teamxenox/caligator)*** :🐊 An open-source kickass cross-platform Calculator with the power of alligator
- ***[Ovuli](https://github.com/sarthology/ovuli)*** : A multilingual Ovulation Calculator and Calendar 👩🏻‍💻

[![](https://res.cloudinary.com/practicaldev/image/fetch/s--wJV5tdzk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/aa8th61p8osw2k98e3vo.png)](https://forms.clickup.com/f/1rz92-5115/IMOREDDKP5U5BN5SW6)