teleren/devto huggingface dataset:
Semantic Releases with Gitlab CI
Tags: git, gitlab, node, javascript
Published: 2020-08-11 12:20:51

If you read about [Commit Standard and Semantic Versioning for any project](https://dev.to/migu33l/commit-standard-and-semantic-versioning-for-any-project-1ihc) from my previous post you'll know what I'm talking about, if not go back and read the post.

In this Post. I'll show you how to configure the same project but now using GitLab CI to create the release version.

First of all, install these two dependencies. We used *gitlab-config* dependency to configure our repository to handle the release.

```bash
npm i -D @semantic-release/gitlab @semantic-release/gitlab-config
```

Now we need to modify our *package.json* and add this code. The only difference here is that we don't have *@semantic-release/github *dependency anymore, and for the release, we share or extend the configuration from gitlab-config dependency. 

```bash
"plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    "@semantic-release/gitlab",
    "@semantic-release/npm",
    "@semantic-release/git"
  ],
  "release": {
    "extends": "@semantic-release/gitlab-config",
    "prepare": [
      "@semantic-release/changelog",
      "@semantic-release/npm",
      {
        "path": "@semantic-release/git",
        "assets": [
          "package.json",
          "package-lock.json",
          "CHANGELOG.md"
        ],
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
      }
    ]
  },
```

Now, we create a **gitlab-ci.yml** file in the root of our project to Gitlab configure our pipeline using the instruction in this file.

```bash
stages:
  - release

semantic_release:
  image: node:12
  stage: release
  only:
    - master
  script:
    - npm i
    - npx semantic-release
```

Finally, push your changes to the master branch, and see the magic happens 😜.
Mobile-enabled development with webdev
Tags: webdev, android, help, ios
Published: 2020-08-11 12:09:31

Website should be enabled for access beyond mobile's screen size, but may be patched with web server / serverless for capabilities beyond web browser.

I know well, though, that some capabilities will still be disabled in web browser, and some will be disabled in mobile.

What are options? Capacitor / Ionic is obvious, but what about Flutter or Xamarin?

Also, if I use standard webdev + PWA with serverless first, can I add Capacitor later on?
Daily Developer Jokes - Tuesday, Aug 11, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-08-11 12:00:06

---
title: "Daily Developer Jokes - Tuesday, Aug 11, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Tuesday%2C%20Aug%2011%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125975d389d.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___-___ Knock Knock!

___-___ An async function

___-___ Who's there?
 -->
What irritates you the most as a developer? 👩‍💻👨‍💻
Tags: watercooler, discuss
Published: 2020-08-11 11:46:51

The week has just begun. A dozen more deadlines have probably been tossed at you already. So, let's detox a little today. 

What's the one thing that *really bugs* the developer in you?

Vent out in the comments below. 💆‍♀️💆‍♂️
can't use .filter() after .forEach()
Tags: node, javascript, help, discuss
Published: 2020-08-11 11:46:03

Hi!

So I came across this problem. 

I have an array of N elements. I'd like to run every element against a function. 

so I would go:

```
myArray.forEach(item=>process(item)
```

Now I want to filter some of them and call another function on the rest of them.

```myArray
   .forEach(item=>process(item)
   .filter( somelogic )
   .forEach( item=>postProcessSome(item) );
```

But that's not valid code. forEach returns undefined so I can't call filter. I can use map instead of forEach but that way I can't use one liners. 

What's an elegant way to do this? For example in Java I could use .peek that acts like a foreach but returns the value. 

Thanks for help.
What is a Good Code-to-Team Ratio?
Tags: discuss, productivity
Published: 2020-08-11 11:45:13

---
title: What is a Good Code-to-Team Ratio?
published: true
description: 
tags: discuss,productivity
---

We have recently had a discussion about the increasing complexity of the system we are building and the decreasing productivity.

We've counted 19 domain-specific microservices + 21 UI npm modules that we have developed with two teams (5 + 7 devs) over the course of the last 5 years. Although we've automated a lot of stuff and it allows us to run different technologies (vert.x, Spring Boot, AngularJS, Angular), this has become more of a distributed monolith than a true miroservice-based system from an organizational and deployment perspective and the maintenance costs and feature development costs increase.

**In your experience and opinion, what has been a good size of a system (or part of a system) that can be handled by one team? Do you also operate and support? How to you tackle increasing complexity**

It think doesn't make sense to have a fixes metric like LOC/person or so, so please share your views on that topic.
Are developers commodities or Rockstars?
Tags: jobs, hiring, management, career
Published: 2020-08-11 11:43:37

The developer market has increased in the past years. Many Businessmen treat them as commodities but pay them like rockstars. 

*What is the deal?* 

*Is that market sustainable in the long term?*

I heard many businessmen told me: *“Software? Just tools. Developers? Just a commodity”.* At the same time, most companies pay developers like rockstars. What is the truth? 

In [this article](https://towardsdatascience.com/are-developers-commodities-or-rockstars-41b22dffcc5?source=friends_link&sk=1dbcd6bbe13f17a2ce380289909cd8c9), I will explain and comment with data on the evolution of the developers’ job market. 

After 15 years of experience in the IT field, initially as a developer and then as a manager, I will try to tell both sides of the story. 

[Read the article](https://towardsdatascience.com/are-developers-commodities-or-rockstars-41b22dffcc5?source=friends_link&sk=1dbcd6bbe13f17a2ce380289909cd8c9)
Prevent Repeat Purchase (WooCommerce)
Tags: wordpress, php
Published: 2020-08-11 11:32:51

Depending on what kind of products you sell, you may want to prevent customers from purchasing a WooCommerce product more than once from your store. For some shops, you may want to disable any repeat purchases at all, or you may want to prevent repeat purchase only for a specific product.

<h3>Prevent Repeat Purchase with WooCommerce: Specific Product</h3>

The first thing we’ll need to do (and the one essential thing) is to prevent repeat purchases — this is where we’ll check that the customer has already bought the product, and ensure it can’t be purchased if so. We’ll only need the ID of the product that should not be purchased again.

<pre>
//Hook into the after checkout validation action, add a callback function named 'validate_no_repeat_purchase' with a priority of 10 and pass two arguments.
add_action( 'woocommerce_after_checkout_validation', 'validate_no_repeat_purchase', 10, 2 );

//The callback function accepts the array of posted checkout data and an array of errors
function validate_no_repeat_purchase( $data, $errors ) {
	//extract the posted 'billing_phone' and use that as an argument for querying orders.
	$args = array(
		'billing_phone' => (string) $data['billing_phone'],
        'date_created' => '>' . ( time() - 60*60*24*7 )
	);
    $match = 0;

	//loop through the cart items to see if one is the product that doesn't allow repeat purchases.
	foreach( WC()->cart->get_cart() as $cart_item ) {
		$product_id_no_repeat_purchases = array(34855, 34854, 34841);//substitute your product id.
	if (in_array($cart_item['product_id'], $	)) {
				//use the WooCommerce helper function to query for orders with this phone number:
				$orders = wc_get_orders( $args );
                foreach ($orders as $order) {
                    foreach ( $order->get_items() as $item_id => $item ) {
                    $product_id = $item->get_product_id();
                        if($product_id == $cart_item['product_id']) {
                            $match = 1;
                            break;
                        }
                    }
                }			
			}
		}
	//if an order with this email exists, don't allow another one.
	if ( $match == 1) {
		$errors->add( 'validation', '<strong>Repeat orders are not allowed.</strong>' );
	}
}
</pre>

And if you want to vallidate by email just change the <code>$args = array('customer' => $data['billing_email'],);</code>
Learning Management System - BIS (Frontend)
Tags: angular, typescript, html, css
Published: 2020-08-11 11:11:51

This is a School Management System for Bright International School. This is the frontend project done with Angular 8. It manages all the student, teacher, and class details and it also generates custom student reports. Also, it shows all the statistics related to students, teachers, classes, and subjects. #angular #javascript #typescript #html #css
{% github suharaaa/bis-frontend %}
How to monetize your programming skills as a beginner
Tags: tips, help, beginners, career
Published: 2020-08-11 11:08:04

##1. Blogging
Now I know everyone and their mom tries to get you to start a blog. But hear me out!

If you’re a programmer, you can always make money through a blog in the programming niche. 

And there are many ways to monetize a blog as a programmer:

1. offering coding skills online
2. charging for premium content
3. earning through affiliate links

##2. Join Coding Competitions
Coding contests are a great way to get paid good money with your coding skills. Most contests offer substantial cash prizes to the winners. 

Some of the most popular coding contests include Topcoder, CodeChef, HTML5Contest, and CallingAllInnovators…but there are definitely more out there.

There are 3 competition areas:

1. Design
2. Development
3. Data science

##3. Develop Apps
If you are familiar with Objective-C or Swift, you can create an essential iOS app in just a few hours. Then launch it on the App Store. After that, you can sell it to the public through different kinds of media.

Once you’ve developed your app, you can sell it on Flippa for cash through an auction process or a classified listing. 

##4. Create A YouTube Channel
Create videos showing people tips on coding, and be consistent. The more subscribers you have, the more views you’ll get… and the more you will earn.

And there are many ways to earn from a youtube channel:

1. offering coding skills online
2. charging for premium content
3. earning through affiliate links
4. Google AdSense

###See more ways to 👉 [earn from coding](https://www.codesnail.com/make-money-from-programming/)
What would be the simplest way to output sound to browser from a C program?
Tags: help, gwion
Published: 2020-08-11 11:07:49

# Getting gwion to the browser

## Some context
I made this [progamming language](https://github.com/fennecdjay/Gwion) to help in some of my musical projects. A few days ago I made a [Repl](https://repl.it/@GwionLang/Gwion-latest). I think I have a way to provide drivers and libraries to it (leveraging github releases).

## The problem

As of now, I have no driver that could send the sound to the browser. I guess I could easily hack something around libsndfile to provide say, a .wav, but it would really be better if I could have some realtime output to web-browser.

## Do you have an idea?

So I'm asking here, as many DEV users have a good knowledge of web techniques and on my side I know, well, music and C.
How do I begin with Machine Learning?
Tags: machinelearning, datascience, 100daysofcode, python
Published: 2020-08-11 11:06:58

Did you just step into Machine Learning and searching where to learn from?

If yes, then you must know the right path and a road map that will make you a great Machine Learning Engineer.

Given below is a list of beginner tutorials you should begin with. Start Right & Win the Battle.

Introduction to Machine Learning - https://www.asquero.com/article/introduction-to-machine-learning

Applications of Machine Learning - https://www.asquero.com/article/applications-of-machine-learning

Steps involved in a Learning System - https://www.asquero.com/article/steps-involved-in-a-learning-system

Supervised Learning - https://www.asquero.com/article/supervised-learning

Unsupervised Learning - https://www.asquero.com/article/unsupervised-learning
Coding Grace August Newsletter is out
Tags: diversityintech, irishdev, newsletter
Published: 2020-08-11 11:00:47

Apologies for the lateness of the post, I was on vacation last week but I manage to get the newsletter out on Tuesday. 🙌

In this newsletter, I cover the upcoming virtual tech events and some in-person events and like before I try to highlight ones based in the island of Ireland. This hand-curated list also has a section to highlight diversity in tech events in Ireland as well as call to actions and opportunities.

If there's anything I'm missing, and you want to add yours to our next newsletter in September, drop us an email at contact@codinggrace.com (or leave a comment below).

I still keep a live blog of virtual tech events for the community at https://www.codinggrace.com/news/live-blog-part-3-virtual-tech-events-during-covid-19-2020-7-31/

## [READ AUGUST NEWSLETTER](https://us7.campaign-archive.com/?u=8612b25618972d14df5c6a1fb&id=ea71fae4ab)
Script to check git status, add files, commit and push.
Tags: git, script, ubuntu, bash
Published: 2020-08-11 11:00:10

The process of adding and pushing files with git may tend to be boring and repetitive.
Do less with one script, check git status, add files to staging area, commit the staged files with a message, and push with **"gscp"** script.

#### How to use the script
### Step 1. Download the script from the github repo.
[Link To Repo](https://github.com/kyagie/gscp.git)
`git clone https://github.com/kyagie/gscp.git`
### Step 2. Paste the script in the a folder called bin in your user directory.
If you do not have this folder, create it in the /home/{user} directory, with `mkdir bin`. And paste the script here.

You should end up with something like this `/home/arthur/bin/gscp`

### Step 3. Change permissions on the file.
`chmod 755 gscp`

**The script is now ready for use globally**

If you found this helpful, you can support me by buying a coffee [Buy Me A Coffee](https://www.buymeacoffee.com/kyagie)
Thank You
Why Migrate Magento 2 is better than Magento 1?

Tags: magento2migrationservices, magento2upgradeservices
Published: 2020-08-11 10:50:47

The ideal opportunity for Magento 2 migration has come up and in case you’re planning moving over to Magento 2, Rock Technolabs guarantee you that your significant information will be moved securely, productively and reliably, in accordance with your current extensions, modules, themes, plug-ins, and customizations with zero information loss and minimal downtime, so your new site is good to go quickly.

With more than 7 years of experience and expertise, Rock Technolabs offer from start to finish Magento 2 Migration service to securely and safely move your web-based business store to the highly advance and feature-rich Magento Platform.

Contact Rock Technolabs for a safe and secure Magento 2 Migration Services.

Learn More:- http://magento2migratedeveloper.over-blog.com/2020/08/why-upgrade-magento-2-is-better-than-magento-1.html
ClojureScript simple MVU loop refined
Published: 2020-08-11 10:49:16

_In dynamic languages, it turns out the MVU `init` function is unnecessary._

In the [previous article](https://dev.to/kspeakman/clojurescript-simple-mvu-loop-n4e) I developed a simple MVU loop. As one of the TODO items, I posited that it would be possible to eliminate the init function and turn it into an event. Well, I did that. I also removed history since it is currently unused and unexposed functionality. And it shrunk both the mvu code and the app code. The MVU code is down to about 35 narrow lines of code.

**Update: I created an [async](https://dev.to/kspeakman/clojurescript-async-mvu-1ddl) version.**

Here is the app code.

```clojure
(ns core
  (:require [mvu]))

(defn updatef [model [tag data :as event]]
  (case tag
    :init [{:count 0} []]
    :clicked [(update model :count inc) []]
    [model []]))

(defn render [{count :count :as model}]
  [:div
   [:button {:type "button" :on-click #(mvu/notify :clicked)} "Click me"]
   [:div "Count " count]])

(defn perform [model effect]
  nil)

(def config {:mvu/update updatef
             :mvu/render render
             :mvu/render-node (js/document.getElementById "app")
             :mvu/perform perform})

(defn ^:dev/after-load on-reload []
  (mvu/on-reload config))

(defn main [& args]
  (mvu/create config))
```

Now "init" is just another event handled by the update function.

And here is the MVU code now.

```clojure
(ns mvu
  (:require [reagent.dom :as rdom]))

(defonce state-atom (atom {}))

(defn default-log [event next-model effects]
  (js/console.log (clj->js
                   {:event (filter identity event)
                    :model next-model
                    :effects effects})))

(def defaults {::log default-log
               ::init-event [:init]
               ::model {}})

(defn notify [& event]
  (let [{updatef ::update
         render ::render
         render-node ::render-node
         perform ::perform
         log ::log
         model ::model} @state-atom
        [model effects] (updatef model event)]
    (cond goog.DEBUG (log event model effects))
    (swap! state-atom assoc ::model model)
    (rdom/render (render model) render-node)
    (doseq [effect effects]
      (perform model effect))))

(defn on-reload [config]
  (let [{render ::render
         render-node ::render-node
         log ::log
         model ::model
         :as state} (merge @state-atom config)]
    (cond goog.DEBUG (log [:hot-reloaded] model []))
    (reset! state-atom state)
    (rdom/render (render model) render-node)))

(defn create [config]
  (let [state (merge defaults config)]
    (reset! state-atom state)
    (apply notify (::init-event state))))
```

Notice that MVU provides some fairly obvious defaults. The model is an empty map and the init event is just `:init`. You can override this by providing a different init event in the start config. You can also do this for the initial model and the log function.

Clojure + MVU is such a great combo.
CircleCIで変数を扱う
Tags: circleci
Published: 2020-08-11 10:31:07

---
title: CircleCIで変数を扱う
published: true
tags: circleci
---

CircleCIの実行環境もシンプルなシェルスクリプトなので、環境変数に代入すれば他のステップで使用することができます。

<https://circleci.com/docs/2.0/env-vars/>

## サンプルリポジトリ

{% github YutaGoto/circleci-variable %} 

## コード

```yaml
version: 2.1

jobs:
  build:
    docker:
      - image: circleci/ruby:2.6.3-stretch-node
    steps:
      - checkout
      - run:
          command: ruby app.rb
      - run:
          command: echo "export RUBY_TEXT='$(ruby app.rb)'" >> $BASH_ENV
      - run:
          command: echo "${RUBY_TEXT}"

workflows:
  build:
    jobs:
      - build
```

### 実行結果

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/bcliwxne972ofykwwwa7.png)

### 解説

`echo "export RUBY_TEXT='$(ruby app.rb)'" >> $BASH_ENV` で `ruby app.rb` の実行結果を `RUBY_TEXT` に代入して環境変数として登録しています。

活用方法の例としては、 `RUBY_TEXT` をSlackなどに送信があります。

{% github YutaGoto/select-con %}

--

局所的なtipsですが、役に立てれば幸いです。
Steve Klabnik Interview: Rust isn’t afraid to be imperfect as long as we ship something useful
Tags: rust, ruby, devops
Published: 2020-08-11 10:19:45

Steve Klabnik is a member of the Rust core team, an active open-source contributor, and author of The [Rust Programming Language](https://evrone.com/rust), Rails 4 in Action, and Designing Hypermedia APIs books. In 2012 and 2016, we invited Steve to speak at the RailsClub (now RubyRussia) conference. Since then, Steve has been working on Rust a lot, did a lot of interesting things and we realized that we should definitely interview him once again!

We sat down with Steve to hear from him first-hand about his professional activities at the moment, the design success of Rust, a little about the "full-stack" development hype, and overcoming burnouts.

[Read the interview on our blog](https://evrone.com/steve-klabnik-interview)
Ziad K Abdelnour: ElateInvest investor Partnership with BlackhawkPartners

Tags: business, entrepreneur
Published: 2020-08-11 10:04:02

https://www.ziadabdelnourblackhawk.com/our-investment-criteria-and-interests-for-2016-and-beyond/
Ziad K Abdelnour :A Chinese investment group backed by large strategic and investors from China - Elate would be interested to invest in partnership with Blackhawkpartners
Typescript: is it possible to apply multiple method decorators using class decorator?
Tags: discuss, javascript, typescript, decorator
Published: 2020-08-11 09:46:58

---
title: Typescript: is it possible to apply multiple method decorators using class decorator?
published: true
tags: discuss,javascript,typescript,decorator
---

Hi, devs. I've just opened up a question in stackoverflow. I'm sure it's a good question for you if you have some knowledege in **typescript decorators**.

Please help me in StackOverflow. Thanks!

{% stackoverflow 63355363 %}
Landingpage erstellen Tutorial - Vier einfache Schritte
Tags: onlinemarketing, landingpage, sendinblue
Published: 2020-08-19 13:43:50

---
title: Landingpage erstellen Tutorial - Vier einfache Schritte
published: true
date: 2020-08-11 09:45:59 UTC
tags: OnlineMarketing,landingpage,sendinblue
canonical_url: https://j0e.org/sendinblue-landingpage-erstellen/
---

![Sendinblue Landingpage erstellen](https://j0e.org/wp-content/uploads/2020/08/sendinblue-landingpage-erstellen.png)

Hast du dir auch schon oft überlegt, wie du einfach eine Landingpage erstellst? Ich habe …

Probiere es, geht wirklich einfach!

Der Beitrag [Landingpage erstellen Tutorial - Vier einfache Schritte](https://j0e.org/sendinblue-landingpage-erstellen/) erschien zuerst auf [WordPress und Marketing](https://j0e.org).