teleren/devto huggingface dataset:
LIVE coding during COVID: Solace ft CircleCI
Tags: watercooler, live, eventdriven, node
Published: 2020-05-13 15:11:03

---
title: LIVE coding during COVID: Solace ft CircleCI
published: true
description: This is a watercooler blogpost 
tags: watercooler, live, eventdriven, nodejs
---
# The Developer Species 

As a developer, I bet that you also get uneasy stagnating and not leaning something new. We are always on the look for something challenging and "cool" (technically speaking) whether be it the next HOT framework, programming language or reading up on new development patterns that will increase the efficiency of your program (confession session: I'm a victim for this).

One way I tend to learn about a new technology is by attending in-person conferences and workshop as it gives me the opportunity to have a hands-on learning experience. I particularly enjoy that as it gives me some face-to-face interaction with other technologists and developers, which sparks a lot of interesting conversations and back and forth questions entertaining the inner geek in me. I call this Tamimi's Brainstorming Thought Volleyball™, or TBTV, where we get the opportunity to bounce off ideas and questions with other people. 
![Beach Volleyball](https://media.giphy.com/media/oqKZmsUUURlZe/giphy.gif)

HOWEVER, we are currently surrounded by this thing called COVID (aka rona by some people, dont @ me) which stands in the way of the physical interaction learning process.

# What's the alternative
You guessed it, LIVE coding sessions! (don't give yourself credit for guessing it, the title of this post gives it away). I'm taking part of a LIVE coding session with Angel from CircleCI where I build an event driven application and learn about build pipelines, a topic that I am alway curious to learn more about. The session will take place today, **Wednesday May 13 2020, at 2:00 pm EST** and you can check it out on this link 
https://www.youtube.com/watch?v=P4ewUZRhVLA. If you're more of a twitch streams kind of person, you can also join here https://www.twitch.tv/circleci

### What's in it for me, you may ask
Attending this, you will get the chance to

```js
if (User.didAttend()) {
    console.log("Learn about eventdriven development by using Solace PubSub+ Event Broker")
    console.log("Learn NodeJS if you want to get into it or you're a beginner")
    console.log("Learn about CircleCI build pipelines")
    console.log("Teach attendees some cool things!")
}
```

So come take part in this interactive session and chat with us on the live stream, I'll give you a shout out if you ask a question 😎

# What about you?
How do you deal with the lack of physical interaction and attending in-person events? How do you make the learning process more interactive? Have you attended any live coding sessions and actually learnt something from it?

And to end on a good note, I’d like to leave you with one of my favorite gifs
![Hacker nerd programming](https://media.giphy.com/media/llKJGxQ1ESmac/giphy.gif)

*Disclaimer: I am a Developer Advocate at Solace @SolaceDevs*
Deploy a Vue App to Cloudflare Workers
Tags: vue, cloudflare, workers
Published: 2020-05-13 15:07:01

---
title: Deploy a Vue App to Cloudflare Workers
published: true
description: Deploy your Vue app to the edges of the web with Cloudflare Workers
tags: vue, cloudflare, workers
---

Cloudflare Workers is probably the easiest way to deploy super fast serverless code to edge locations around the world. In this post, we'll explore what it takes to deploy a Vue application with Workers (hint: it doesn't take much).

## Prerequisites

You'll need a [Cloudflare](https://cloudflare.com/) account with Cloudflare Workers enabled, as well as the [Workers Unlimited Plan](https://workers.cloudflare.com/sites#plans).

I was able to test with the free plan so you probably can, too, but I recommend upgrading because it's a great deal.

## Create a Vue App

To get started, let's create a Vue app via the CLI with `npx @vue/cli create vue-on-workers && cd vue-on-workers`. This will create our app, install our dependencies, and put us right where we need to be.

## Install the Wrangler CLI

Wrangler is a sweet CLI that Cloudflare cooked up for us. Install it with `npm i -g @cloudflare/wrangler`.

For this next part, you'll [need an API Token](https://developers.cloudflare.com/api/tokens/create). TIP: Use the "Edit Cloudflare Workers" template.

Run `wrangler config` to get set up using the CLI.

## Configure Your Project

With our Vue app created and Wrangler all config'd up, we can now turn our Vue project into a Wrangler project by running `wrangler init --site`.

You may notice your project now has a `wrangler.toml` file as well as an additional directory, called `workers-site`.

Now, all that's left to do is add a couple things to the config file. Add your `account_id` (can be found in the bottom-right of your Cloudflare dashboard) and ensure `bucket` is set to the `dist` directory:

```toml
name = "vue-on-workers"
type = "webpack"
account_id = "add_your_account_id" # HERE
workers_dev = true
route = ""
zone_id = ""

[site]
    bucket = "dist" # AND HERE
    entry-point = "workers-site"
```

## Deploy to Workers

Once you've set those two items in your `wrangler.toml` file, run `npm run build && wrangler publish` to build and deploy!

That's it!

🎉🎉🎉

## Additional Reading & Considerations

- There's additional work that needs to be done in order to ensure that Vue Router can handle routing appropriately, which you can read more about in this great [Stack Overflow answer](https://stackoverflow.com/questions/58432345/cloudflare-workers-spa-with-vuejs/58439234#58439234).
- Workers is a great (_possibly_ better) solution for hosting a statically-generated site, like the ones you get from [Gridsome](https://gridsome.org/), [Gatsby](https://www.gatsbyjs.org/), or [Hugo](https://gohugo.io/).
- Read more about [hosting a site on Cloudflare Workers](https://workers.cloudflare.com/sites).

---

Need some help? Want to chat? Feel free to [reach out](https://twitter.com/briansw).
Helm Charts Explained
Tags: helmcharts, tiller, devops, kubernetes
Published: 2020-05-13 15:04:06

You will learn 
- What is Helm Chart? And it's features.
- When to use & How to use?
- What is Tiller in Helm? What role it plays?
Check the link: https://youtu.be/e2bGLWef9gQ
Monitor and Analyse SQL Server Performance
Tags: sql, database, monitor
Published: 2020-05-13 15:01:01

[dbForge Monitor](https://www.devart.com/dbforge/sql/monitor/) is a FREE add-in for Microsoft SQL Server Management Studio that allows you to track and analyse SQL Server performance. The tool includes a variety tools for SQL Server diagnostics, including a bunch of SQL performance metrics allowing to see the comprehensive and clear picture of all processes taking place on the server, detect most expensive queries, waiting tasks, and performance bottlenecks. With dbForge Monitor, you will save hours of time spent on SQL Server performance analysis!
Bite-Size Python: Basic List Operation
Tags: python
Published: 2020-05-13 15:01:00

---
title: Bite-Size Python: Basic List Operation
published: true
description: Basic List operation in Python
tags: python
---

### List is one of the most important built-in data structure uses in Python.
This post will cover some important and frequently use functions&methods to do basic operation/manipulation with list.

Let's start!

List creation

```python
# create empty list
>>> a_list = []
# or
>>> a_list = list()

# we can use list() to create list from some sequence
>>> list(range(10))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

# or create from other data structure
# be careful, this only retrieve dictionary keys
>>> list({"key1": "value1", "key2": "value2"})   
['key1', 'key2']

# use items() to retrieve key-value pair
>>> list({"key1": "value1", "key2": "value2"}.items()) 
[('key1', 'value1'), ('key2', 'value2')]
``` 


List accessing

```python
# list sequence is 0-based indexing, means index of list start from zero
>>> a_list = list(10) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> a_list[0]
0
# list in Python support negative indexing too
>>> a_list[-1]
9
# we can obtain some part of the list by using slice
# obtains sub-list from index 1 to index 5
>>> a_list[1:5] 
[1, 2, 3, 4]
# and of course slicing support negative indexing
>>> a_list[-5:8]
[5, 6, 7]
```


List modification

```python
# modify list is simple, for example use indexing and assignment
>>> a_list[0] = "hello" # yes, we can store other data type inside list
>>> a_list
['hello', 1, 2, 3, 4, 5, 6, 7, 8, 9]

# multiple value is possible
>>> a_list[-5:8] = [50, 60, 70]
>>> a_list
['hello', 1, 2, 3, 4, 50, 60, 70, 8, 9]

# delete element of the list using `del`
>>> del a_list[0] # delete first element of the list
a_list
[1, 2, 3, 4, 50, 60, 70, 8, 9]

# append new element in the list
# use append() to add new element next to the last 
>>> a_list.append(90)index
>>> a_list
[1, 2, 3, 4, 50, 60, 70, 8, 9, 90]
```


Wrangling

```python
# sorting, Python provides sorted() and sort(), both sort ascending by default
# sorted() return `new` list
>>> sorted(a_list)
[1, 2, 3, 4, 8, 9, 50, 60, 70, 90]

# sort() sort input's list `inplace`, so be careful with this
# return None, use `reverse=True` to sort descending
>>> a_list(sort, reverse=True)
>>> a_list
[90, 70, 60, 50, 9, 8, 4, 3, 2, 1]

# list comprehension
>>> double_a_list = [i*2 for i in a_list]
>>> double_a_list
[180, 140, 120, 100, 18, 16, 8, 6, 4, 2]

# using reverse() to reverse element.
>>> double_a_list.reverse() # reverse also `inplace` modification, be careful with this too
>>> double_a_list
[2, 4, 6, 8, 16, 18, 100, 120, 140, 180]
```

There are more! But I hope this will enough for now.
You can consult [this document](https://docs.python.org/3/tutorial/datastructures.html#more-on-lists) for more functions and usages.

Thanks for reading! :)
Debug Kotlin with Xcode References
Tags: kotlin, kotlinmultiplatform, ios, development
Published: 2020-05-13 14:54:32

I’m going to share a very (very) simple, helpful, little trick if you want to debug a Kotlin shared framework within an iOS application. Adding Xcode references to the Kotlin files in your shared library will enable you to do frequently used development practices, such as setting breakpoints or opening files from a memory debugger.

Before getting started though, it’s important to note that your shared Kotlin framework needs to be dynamic for these file references to be useful. If it isn’t, then any breakpoints you set in your Kotlin files in Xcode will not be hit. Other debugging tools and practices will not yield useful results such as function names and line numbers.

If you don’t know how to get your shared Kotlin library to produce a dynamic framework, we’re using Touchlab’s [fork of the Kotlin Multiplatform Cocoapods plugin](https://github.com/touchlab/KotlinCocoapods). 

Double or right click in the Project Navigator, which is the left side pane of Xcode that shows the project’s structure (shown below). 

First select **New Group** from the dropdown and create a directory (“Kotlin Debug” in the example below). This is where we’re going to put the references. 

Next, double or right click your new directory in the Project Navigator and select **Add Files to [Directory Name]**. 

In the Finder window that appears, navigate to your shared Kotlin library. Feel free to add as many of the library files as you like, but I recommend just **[Shared Kotlin Library]/src/commonMain/** and **[Shared Kotlin Library]/src/iosMain/**. Together, those two directories contain all of the Kotlin files you may need to debug from your iOS application. 

![Project Navigator Dropdown Menu](https://dev-to-uploads.s3.amazonaws.com/i/akqtg2veya3u08djqr12.png)

If you’re using Instruments to debug memory issues in your shared Kotlin library, then you may need to close and reopen Xcode before Instruments is able to open your Kotlin files in the Xcode window containing your iOS project.
ASP.NET Core WebApp doesn't work
Published: 2020-05-13 14:35:15

Hello developers,

last week i upgraded my blogs codebase from ASP .NET Core 2.1 to 3.1. I think anything goes broken.
The build itself works as expected without any errors. Then Visual Studio opens the configured port on localhost. And then i just see a blank page without anything.
If you are also develop with ASP .NET Core, maybe you can have a look about my repository: https://github.com/saigkill/saschamannsde/ ?
I already checked that locations, where i expected an error, but nothing found. :-( I think i have forgotten anything in that codebase...
German Corona warning app GitHub repo got published
Tags: corona, covid, opensource, discuss
Published: 2020-05-13 14:29:14

---
title: German Corona warning app GitHub repo got published
published: true
description: German Corona warning app GitHub repo got published
tags: Corona, Covid, OpenSource, discuss
---

The aim of the Corona warning app is to recognize and break through SARS-CoV-2 infection chains as quickly as possible. Users should be reliably and quickly informed about encounters with infected users of the app and thus possible transmissions of the virus so that they can voluntarily isolate themselves in order to help contain the SARS-CoV-2 pandemic.

https://github.com/corona-warn-app/cwa-documentation

From the README:

"The German government has asked SAP and Deutsche Telekom to develop the Corona-Warn-App for Germany as open source software. Deutsche Telekom is providing the network and mobile technology and will operate and run the backend for the app in a safe, scalable and stable manner. SAP is responsible for the app development, its framework and the underlying platform. Therefore, development teams of SAP and Deutsche Telekom are contributing to this project. At the same time our commitment to open source means that we are enabling -in fact encouraging- all interested parties to contribute and become part of its developer community."

...

Update: the [backend](https://github.com/corona-warn-app/cwa-server) got published.

As a german citizen its very interesting to me, also because it is a controversial discussed topic. 

What do you think of such apps? 

Do you have similar projects in your countries?
Hey, I'm trying to deploy a site with gatsby but I'm getting an error
Published: 2020-05-13 14:28:29

so I'm getting an error saying cannot destructure property 'currentTheme' object as it is undefined 

//Layout
  const {currentTheme, cursorStyles} = useGlobalStateContext()
  const dispatch = useGlobalDispatchContext()

//GlobalContext
const globalReducer = (state, action) => {
    switch(action.type) {
        case "TOGGLE_THEME": {
            return {
                ...state,
                currentTheme: action.theme,
            }
        }
        case "CURSOR_TYPE": {
            return {
                ...state,
                cursorType: action.cursorType,
            }
        }
        default : {
            throw new Error(`unhandled action type: ${action.type}`)
        }
    }
}

//Provider
export const GlobalProvider = ({children}) => {
    const [state, dispatch] = useReducer(globalReducer, {
        currentTheme: window.localStorage.getItem("theme") === null ? "dark" : window.localStorage.getItem("theme"),
        cursorType: false, 
        cursorStyles: ["pointer", "hovered", "nav-open"]
    })
Journey into Web Monetization - day 4
Tags: gftwhackathon, webmonetization
Published: 2020-05-13 14:27:02

Yesterday I looked at setting up sending payments in the Interledger network. Still not fully grasping how everything works so did some more research.

Here's what I came up with:

#### ILP Connector (`ilp-connector`)

- Also called Interledger Service Provider (ILSP) and routes packets from connected servers
- Connectors work as decentralized exchanges
- Configured with assetCode (XRP, ETH, BTC, eth) and uses plugins to transact with ledgers
- This is what moneyd uses to connect to the network

#### ILP Stream (`ilp-protocol-stream`)

- Creates a server with a connection to the Interledger network
- Plugin configures which ILP Connector to connect to
- Generates credentials for clients to establish stream and send payments to wallet

#### ILP Plugin (`ilp-plugin-*`)

- Plugins handle the logic of how to perform the transactions by extending `sendMoney` and `_handleMoney`
- You can write your own plugin to extend these and add custom behaviour to interact with other ledgers
- For example `ilp-plugin-ethereum` uses ethers.io to manage an Ethereum Wallet and connecting to the ledger
- Connectors, servers and clients can use these plugins to establish link between them

So basically, Controllers are the routers doing the actual transactions, ILP Streams are receiver (with `createServer`) and senders (with `createConnection`). Plugins are used to define how transactions are stored in ledgers.

Here are some ideas of code examples that would be helpful
- Self-hosted multi-wallet to allow users to register and create payment pointers
- Wallet with Stripe integration to handle subscription and payouts
- Browser extension to establish stream to payment pointer in meta tag
- Simple plugin to show integration with other libraries
- Something to show transaction statistics
PurgeCSS gotchas
Tags: css, webdev, javascript, vue
Published: 2020-05-13 14:10:59

Some time ago I bought a [Tailwind UI](https://tailwindui.com) license and I wanted to test it alongside Vue.

Following the example of someone who created a website to sell pixels from the website: [http://milliondollarhomepage.com](http://milliondollarhomepage.com)

And the "I'm Rich" app: [https://en.wikipedia.org/wiki/I_Am_Rich](https://en.wikipedia.org/wiki/I_Am_Rich)

I came up with something funny to work on and test it. I created **[URList](https://url-list.com)**, a site to archive a limited amount of URLs that can be tagged!!! 🥳🥳🥳

I used Laravel, Laravel Forge, Vue CLI and Tailwind UI to create it and it was a wonderful experience! If you already worked with [TailwindCSS](https://tailwindcss.com) you know that it offers a wonderful experience to create UIs, so you know what I'm talking about.

The first time I created a build I didn't set the PurgeCSS so I got a 3MB+ css file. Then I configured PurgeCSS and ran again and it was less than 20Kb, this is amazing!!! But when I took a look on the app, some things were broken and I didn't understand why, but it was because of the PurgeCSS somehow.

After some minutes I remembered that I had some classes that were applied dynamically using Vue, so I set these on PurgeCSS whitelist and it was all good.

I know that this is something really basic and simple, but I thought about writing about this because since I had this issue, maybe it will help someone else.
Building an education web app in a day
Tags: webdev, webinar, nocode, digitaltransformation
Published: 2020-05-13 13:53:28

My team working on UI Bakery, a low-code development platform, is supporting small businesses in the current times. We’re holding free Webinars to show how to build web apps with responsive design using our platform. No coding skills needed.
The next webinar will be held this Friday (May 15) at 1 p.m. (EST) / 7 p.m. (CET) where we'll focus on creating an #education management web app aimed at digitizing education processes. Any questions on no(low)-code app development are welcome after the webinar ends!
See the details and sign up for the webinar here: https://hubs.ly/H0qs_J50 
Even if you're not familiar with the platform, come and see how easy it is to create a full-fledged web app without coding.
You should be using Value Objects
Tags: programming, cleanarchitecture, kotlin, valueobjects
Published: 2020-06-05 22:14:33

---
title: You should be using Value Objects
published: true
date: 2020-05-13 13:25:05 UTC
tags: programming,cleanarchitecture,kotlin,valueobjects
canonical_url: https://medium.com/swlh/you-should-be-using-value-objects-568b19b1df8d
---

[![](https://cdn-images-1.medium.com/max/2600/1*D8VygRHScNSidulpPqq1MQ.jpeg)](https://medium.com/swlh/you-should-be-using-value-objects-568b19b1df8d?source=rss-54ea764ff544------2)

Value objects are one of the building blocks of domain-driven design. Let’s see the value they bring.

[Continue reading on The Startup »](https://medium.com/swlh/you-should-be-using-value-objects-568b19b1df8d?source=rss-54ea764ff544------2)
Wysi Wysi Wysiwyg
Tags: javascript, html, newbie, wysiwyg
Published: 2020-05-13 13:17:42


I have worked with a variety of Wysiwyg's in the past.  

## What is a Wysiwyg?
"Software allows content to be edited in a form that resembles its appearance when printed or displayed as a finished product, such as a printed document, web page, or slide presentation."

Or Simplified: A Html or Content editor

They really have help provide a rich experience for end users that are coders and not non-coders interact with your application.

Here are a few of the top choice I have selected that I have worked with.


1.) Summernote (Arts Choice - Offers AnglarJs Directives)
2.) MediumEditor (Simple/Clean)
3.) TinyMCE (Feature Rich - Popular)
4.) CKEditor (Feature Rich)
5.) KendoUI Editor (Flexibile)

There are many others that I have worked, but this is my list of go to's.

What's your favorite Wysi? 😁
Privileged mode: Running ctop in docker under SELinux
Tags: linux, docker, monitoring, commandline
Published: 2020-05-13 13:04:52

---
title: Privileged mode: Running ctop in docker under SELinux
published: true
description: Monitor your containers without installing anything
tags: linux, docker, monitoring, commandline
---

Some programs like `ctop` are nice to run using docker containers, so that you don't have to manually download a binary and copy it into `/usr/local/bin`, where it will sit in a sad little corner, unmanaged by `apt` or `yum`.

{% github bcicen/ctop %}

But if you run an SELinux-enabled distribution, you'll find that running `ctop` [as the documentation suggests](https://github.com/bcicen/ctop#docker), fails:

```sh
docker run --rm -ti \
  --name=ctop \
  --volume /var/run/docker.sock:/var/run/docker.sock:ro \
  quay.io/vektorlab/ctop:latest
```

🐳 🐳 🐳

```text
ctop - error ───────
  │                                                                                 │
  │  [12:54:15 UTC] attempting to reconnect...                                      │
  │                                                                                 │
  │  [12:54:16 UTC] Get http://unix.sock/info: dial unix /var/run/docker.sock: con  │
  │  nect: permission denied                                               
```

What's going on here?  Presumably SELinux is blocking the `ctop` container's access to information necessary for monitoring the other containers.

## The Fix

Luckily, there's a very easy fix for this!  You can just run the `ctop` container in privileged mode:

```sh
docker run --privileged --rm -ti  \
  --name=ctop   \
  --volume /var/run/docker.sock:/var/run/docker.sock:ro   quay.io/vektorlab/ctop:latest
```

Now you can see all your favorite containers, interact with their log interfaces, dip into their shells, etc:

```text
  ctop - 12:57:42 UTC   8 containers

     NAME        CID         CPU         MEM         NET RX/TX   IO R/W      PIDS

   ◉  bugout_bot… 8f84fe3983…      1%       2M / 944M 19M / 16M   1M / 0B     6
   ◉  bugout_bug… 16f1479be4…      0%       3M / 944M 1M / 1M     6M / 0B     5
   ◉  bugout_gat… fc951914df…      0%       3M / 944M 56M / 35M   256K / 0B   21
```