teleren/devto huggingface dataset:
Moderator/Maintainer needed: Laravel + Vue OSS project
Tags: contributorswanted, laravel, vue
Published: 2019-10-05 14:15:04

I've an oss project built with Laravel and VueJS that is growing. I decided to break up the project into smaller parts and delegate different parts to interested oss enthusiasts. If anybody is interested please join our discord server [here](https://discord.gg/4DvTQsc) and reach out.



{% github iluminar/goodwork %}
Al - Simple alias manager
Tags: go, wsl
Published: 2019-10-05 13:05:46

---
title: Al - Simple alias manager
published: true
description: Simple alias manager
tags: Golang, WSL
---

I recently started using Windows sub-systems for Linux (WSL). It was awesome. I could get the best of both worlds Linux and Windows. But one thing that was really annoying me is aliases. When I was using Linux I use .bashrc to manage my aliases but with WSL I don't have a single place to manage all my aliases across different shells (cmd, bash and power shell). 

I wrote a program to manage alias across different shells. The idea is really simple. Aliases are placed in a file called "al.txt" in users home. When user executes an alias it just reads "al.txt" into Golang map and finds the corresponding command it is mapped to and executes that command. This simple program has improved my dev workflow significantly when working with WSL.

The code for the repo is [here](https://github.com/nestedobjects/al)
Docker Compose Starter Pack 🐋 | Ubuntu Container using Docker and Docker Compose
Tags: docker, dockercompose, devops
Published: 2019-10-05 12:24:42

---
title: Docker Compose Starter Pack 🐋 | Ubuntu Container using Docker and Docker Compose
published: true
description: A Docker Compose Starter Pack for newbies, because Rohan knows you can't format yaml by yourself. 😜
tags: docker, docker-compose, devops
---

Recently, I was trying to spin up a simple Ubuntu container. I noticed that a simple guide with some basic boilerplate code was too difficult to find. So, I wrote my own. 

View it on Github - [Ubuntu-Docker-Compose-Starter-Pack](https://github.com/CT83/Ubuntu-Docker-Compose-Starter-Pack)

### 🐳 

Note, this assumes that you have a gentle grasp of what Docker Compose and Containerization are, so stay put for the rodeo!

#### Components

1. Dockerfile
2. Docker Compose Configuration
3. Startup script

#### 1. Dockerfile

Consider this a recipe that tells Docker how the image needs to be assembled.

Read More - [Here](https://docs.docker.com/engine/reference/builder/)

```
FROM ubuntu:latest

COPY . ./start_script.sh
RUN ["chmod", "+x", "start_script.sh"]

ENTRYPOINT ["sh","./start_script.sh"]
```

Here, we pull the latest ubuntu image from Docker Hub and copy over the startup script (and make it executable) which will be run when the container is initialized, more on this later. 

#### 2. Docker Compose Configuration

A Docker Compose Configuration file or .yml file tells docker how many and what containers we are trying to spin up, what volumes need to be mounted and what environment variables need to be defined. 

Read More - [Here](https://docs.docker.com/compose/compose-file/)

```
version: "3.3"

services:
  hello_container:
    container_name: hello_contaier
    build: .

    volumes:
      - ./data:/mnt/data
      - ./data2:/mnt/data2

    environment:
      SYS_NAME: good-container

volumes: 
  data :
  data2 :
```

Here, we are declaring the container which we plan to use, it's name, volumes which we plan to mount and environment variables we want to use. 

#### 3. Startup Script

This is the file that will be run when the container is created, all the commands your servers, startup scripts should go in here. 

```
#!/bin/bash

echo "Hello World! This is the Ubuntu Container!"
```

### That's it!

#### Spinning up the containers

Once you have docker and docker-compose installed you can simply do

`docker-compose up --build`

to start everything!

View it on Github - [Ubuntu-Docker-Compose-Starter-Pack](https://github.com/CT83/Ubuntu-Docker-Compose-Starter-Pack)
I'm loving No Abstraction Transactional Script
Tags: javascript, practices, programming
Published: 2019-10-05 12:08:20

---
title: I'm loving No Abstraction Transactional Script
published: true
description: 
tags: #javascript #practices #programming
---
At First, we are already using "high-level language" which is strongly abstracted very well for human readable.
And more we're using Libraries, Frameworks many cases.

I prefer if you can accomplish intuitive code easily without  abstraction. 

When I have to write code for accomplish some task, I'll just start from create single file and write code step by step from to top to bottom. That top to bottom code is flat and can read as same as Natural Language like English.
Finally adding test code on order to check is it can accomplish task correctly, that's all nothing wrong.

Wise people's sophisticated design pattern code is difficult to read most cases.

In the Programming World has been have famous best practice that [avoid goto statement](https://www.google.com/search?biw=1086&bih=972&sxsrf=ACYBGNTeXAKMNZi0sviUyXwqWrpDtGVXUw%3A1570275206168&ei=hn-YXaD9CYmxmAXjrb_gCQ&q=avoid+goto+statement&oq=avoid+goto+statement&gs_l=psy-ab.3..0i7i30l5j0i30j0i8i30l2.10752.11266..11860...0.2..0.91.821.10......0....1..gws-wiz.......0i71j35i304i39.1SauVdlCP3U&ved=0ahUKEwig2PP-goXlAhWJGKYKHePWD5wQ4dUDCAs&uact=5).

That general opinion says "jumping place to place causing make confusable code" as a one of the reason.
However typically highly abstracted code are tend to digging and jumping tons of files and many methods, interfaces, implementation classes, where come from data, where come from callback, track event dispatcher/subscriber mechanics etc...

Source code is all consisted by character, design pattern is graphical diagram, It is a completely different concept and format.
**However, we think that the shiny design patterns described in cool and easy-to-understand diagrams can be easily applied to source code composed of strings.**
I think this is actually professional skills matter.

My favorite abstraction I've ever seen is jQuery API.
That's insanely extreme magical spell of CSS, EventHandler, BrowserCompatibiliy, CalculateAnimation without abstraction.
Angular: A use case for `ngProjectAs`
Tags: angular, typescript, webdev, javascript
Published: 2019-10-05 11:39:31

---
title: Angular: A use case for `ngProjectAs`
published: true
tags: #angular #typescript #webdev #javascript
---

{% stackoverflow 57820385 %}

I found `ngProjectAs` to be useful when I wanted to **project** an `ng-container` with a certain selector.

```typescript
@Component({
 selector: 'awesome-comp',
 template: `
  <ng-content select="[foo]"></ng-content>
 `
})
export class AwesomeComponent { }
```

```html
<!-- another-awesome.component.html -->

<!-- We can avoid a redundant `div` like this one -->
<awesome-comp>
 <div foo>
  <h1> <!-- ... --> </h1>
   <p> <!-- ... --> </p>
 </div> 
</awesome-comp>

<!-- By using `ngProjectAs` -->
<awesome-comp>
 <ng-container ngProjectAs='[foo]'>
  <h1> <!-- ... --> </h1>
   <p> <!-- ... --> </p>
 </ng-container> 
</awesome-comp>
```
Integrations mess, how to get out successfully 
Tags: integration, webservices, architecture, productivity
Published: 2019-10-05 10:38:41

**What:** In IT when we talk about integration we intend the process/method to make two or more application/product exchange information to combine and enable capabilities.
In enterprise environment it's very common face the requirements to create a way to move large amount of data between multiple platforms following a complex rules logic, putting in the table a large variety of factor that we need to consider.

**Consideration:**
I tried to list below the major player that we need to consider every time we are going to approach the design of an integration solution.

* Integration ratio 1:1 or 1:n
* Size the amount of data per time to be moved
* Understand what is the data transfer's **Frequency** needed
* Understand the geo location of the server where the delivery of the 
  service needs to be provided
* Type of information needs to be exchange 
* Future possible scenarios, keep scalability as a KPI
* Creation of a consistent API Library
* Performance



**Execution:**
In today enterprise landscape we face sync vs async choice, the main technologies'solution that are helping us to reach our scope are:

In **Synchronous** data exchange, data flows in a full-duplex mode in the form of frames. Synchronization between the source and target is necessary so that the source knows where the new byte starts. Therefore, each block of characters is labelled with the synchronization characters and the receiving device acquires the data until a special ending character is identified.

In **Asynchronous** integrations is a communication method where in the system puts a message in a message queue and does not require an immediate response to continue processing. 


**Technology**

* REST: Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. (from Wikipedia) - SYNC

* SOAP:(Simple Object Access Protocol) is a messaging protocol specification for exchanging structured information in the implementation of web services in computer networks - SYNC

* FLAT FILE: File-based integration is when either your source data and/or your destination data must be represented in a file (like a CSV file) - ASYNC

Those are only three examples, but the number of architecture/methodology are way too wide, in a design process we need to be sure to understand the capability/restrictions of each platform involved.

**Which one is better – Synchronous or Asynchronous?**
There isn’t an answer for this question. Asynchronous and synchronous messaging will each prove valuable in their own way. There are situations where one will work but the other one won’t.
How To:Getting max value in Array in JavaScript without using reduce()
Tags: javascript, array, maxvalue, withoutreduce
Published: 2019-10-05 09:51:25

---
title:How To:Getting max value in Array in JavaScript without using reduce()
published: true
description: Getting max value in Array without using array.reduce() method in Java script.
tags: javascript,array,maxvalue,withoutReduce
---

{% codepen https://codepen.io/muzammilahmed84/pen/WNNNGYr default-tab=js,result %}
When you joined GitHub? WE KNOW! 😄 Octocat Day - Your Open-Source Birthday
Tags: opensource, github, react, hacktoberfest
Published: 2019-10-05 09:50:13

<center><h1>Octocat Day 😺</h1></center>

<p align="center"><b>Believe me, It'll give you your open-source birthday date :grin:</b></p>

<div align="center">
  <img alt="octocat day image" src="https://media.giphy.com/media/j3zhFNDnQXcQ4ajDZo/giphy.gif"/>
</div>

---

Check out the project live at [*OctocatDay.com*](https://www.octocatday.com) and source code [*HERE*](https://github.com/NomanGul/octocat-day)

---

## Built With ⚙️

* [ReactJS](https://reactjs.org/) - The SPA library used 🔧
* [Ant Design](https://ant.design/) - UI library 🌈
* [GitHub API](https://developer.github.com/v3/) - 😺

---


Please don't hesitate to open an [issue](https://github.com/NomanGul/octocat-day/issues) or [pull request](https://github.com/NomanGul/octocat-day/pulls). You can also send me a message on [Twitter](https://twitter.com/NomanGulKhan). Contributions of any kind welcome!

If you have any feedback, please feel welcome to leave a comment below.

![thanks](https://media.giphy.com/media/gu9f2XekTc2uA/giphy.gif)
Immutable Array Operations - JavaScript
Tags: javascript, beginners, array, immutable
Published: 2019-10-05 09:47:06

Reworking the array operations with Immutablity in mind. 

> This article is crossposted from my [blog](https://blog.agney.dev/immutable-array-operations/)

[Svelte JS](https://svelte.dev/) documentation reads:

> Because Svelte's reactivity is triggered by assignments, using array methods like push and splice won't automatically cause updates. For example, clicking the button doesn't do anything.

It further goes on to replace the push operation with:

```js
function addNumber(newNum) {
  numbers = [...numbers, newNum];
}
```

calling it the _idiomatic_ way.

Then it says,

> You can use similar patterns to replace pop, shift, unshift and splice.

Let's see.

## 1. Unshift

This is the polar opposite of the push we saw in Svelte docs.

> Adds one or more elements to the beginning of an array and returns the new length of the array.

Simply reverse it:

```js
function addNumber(newNum) {
  numbers = [newNum, ...numbers];
}
```

## 2. Pop

> removes the last element from an array and returns that element. This method changes the length of the array.

First, we have to remove the last element without mutating the array. We know [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) returns a copy of the array given start and end indices.

```js
function removeNumber() {
  numbers = [...numbers.slice(0, numbers.length - 1)];
}
```

## 3. Shift

> removes the first element from an array and returns that removed element. This method changes the length of the array.

Remove first element without mutating the array. `slice` to the rescue again.

```js
function removeNumber() {
  numbers = [...numbers.slice(1)];
}
```

Let's try out few of other conditions where we can apply the same:

## 4. Splice

> changes the contents of an array by removing or replacing existing elements and/or adding new elements

That's few things, let's break them down:

1. Deletes items starting at an index

```js
function removeNumbers(index, numberOfItems) {
  numbers = [
    ...numbers.slice(0, index),
    ...numbers.slice(index + numberOfItems),
  ];
}
```

2. Inserts item at given index

```js
function insertNumber(index, newNumber) {
  numbers = [...numbers.slice(0, index), newNumber, ...numbers.slice(index)];
}
```

3. Inserts items at a given index.

Notice the plural.

```js
function insertNumbers(index, ...rest) {
  numbers = [...numbers.slice(0, index), ...rest, ...numbers.slice(index)];
}
```

** Double Bonus 🎉🎉: **

### Remove item based on a condition:

```js
function removeItem() {
  numbers = numbers.filter(num => num > 5);
}
```

### Change all items in the array:

```js
function multiplyArray() {
  numbers = numbers.map(num => num * 2);
}
```

Anything more complicated, [Array reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) is your friend.

Happy immutability.
Hacktoberfest 2019 — Time to Start your Open-Source Journey!
Tags: opensource, hacktoberfest, github, beginners
Published: 2019-10-05 09:21:07

---
title: Hacktoberfest 2019 — Time to Start your Open-Source Journey!
published: true
description: Hacktoberfest is back for the 6th year, and here’s everything you need to know!
tags: opensource, hacktoberfest, github, beginners
canonical_url: https://medium.com/@swap/hacktoberfest-2019-time-to-start-your-open-source-journey-8227e10fac33
---

> What is Hacktoberfest, anyway?

Hacktoberfest is a month-long celebration of open-source software. It was started by Digital Ocean in 2014. People from all over the world contributed to make it a huge success. It is now a regular event in October every year.

> Why should I participate?

If you are on the edge, and need some motivation / push to start contributing to open-source, this is the perfect opportunity for you. There are loads of cool swag up for grabs!

> Swag, you say?

Yes! It varies from organization to organization. The most popular one is of Digital Ocean where you get a cool T-shirt on submitting 4 Pull Requests. You can check out http://devswag.io/hacktoberfest to keep tabs on all of the opportunities.

> That’s awesome! I’m sold. How do I participate?

Register at https://hacktoberfest.digitalocean.com/. You can check your status anytime at https://hacktoberfestchecker.herokuapp.com/.

> Can you walk me through everything step-by-step?

Here’s an informative, beginner-friendly and FUN video on how to get started on your open-source journey: https://www.youtube.com/watch?v=jUxy4WNdc0s

> Do you have any collaboration opportunities?

Lots of them (glad you asked):
1. https://github.com/swapagarwal/JARVIS-on-Messenger/issues/559
2. https://github.com/swapagarwal/swag-for-dev/labels/good%20first%20issue
3. Submit geeky translations of English words at https://github.com/swapagarwal/geeksay
4. Submit introductory explanations to technical concepts at https://github.com/swapagarwal/awesome-eli5
5.Submit inspiring content at https://github.com/swapagarwal/awesome-inspiration
Let the Hacking Begin!

I’m aiming for merging 100+ PRs during this month, so if you’re new to open-source, it’s a good time to step up!

Suggested Reading: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github
Aquafresh RO System in South Ex
Published: 2019-10-05 08:54:31

If you are planning to buy best purifier for your office, home etc. then you have to visit on our website https://www.aquafreshropurifier.com because this is one of the best brands that always with quality products. Now people get the best product in South Ex. As well. Aquafresh never provide the duplicate and low-quality RO purifiers to their customers because we want to make the long team relationship with our customers. Aquafresh RO purifiers completely based on advance technology that makes water pure and healthy. This also makes the better taste and quality of our tap water. Don’t waste your time and check the entire quality products directly.
[Devmates.co] Group Anagrams 🏨 Booking
Tags: challenge
Published: 2019-10-05 08:30:05

*Hello👋, 
*My name is [Alex](https://twitter.com/alexwawl) and I'm maker of [Devmates.co](https://devmates.co).* 😊

*We are resolving daily coding problems which asked by top tech companies together. We share our solutions, give some help if anyone stuck, support each other and just hangout together in the internet.* 🍻☕️💬

*I get this problem from our members or just searching them in the internet(leetcode forums, Glassdoor, teamblind, etc.). Sometimes this problem can be very easy, sometimes too 👷‍♂️hard, everything depends on skills but we are trying to resolve all of them and Have Fun.*  🙌 

Today I want to share problem which was asked by 🏨 Booking.

#####Problem:
Given an array of strings, group anagrams together.

#####Example:
__Input:__ ["eat", "tea", "tan", "ate", "nat", "bat"],
__Output:__
    [
      ["ate","eat","tea"],
      ["nat","tan"],
      ["bat"]
    ]
What do you do when you have nothing to do at work.
Tags: work
Published: 2019-10-05 07:52:53

---
title:What do you do when you have nothing to do at work.
published: true
description:Sometimes you might have nothing to do at work for weeks or months. so what do you do in order not to lose your interest in coding. because for me, when I don't have any tasks to do I get bored and after a while coding would be a hard work for me. Have you ever experiences this situation?
tags: work
---
Mady my 2d Java strategy game open source!
Tags: game, java, strategy
Published: 2019-10-05 07:51:19

I recently decided to open-source my Java game project, because its too much by myself to come to any meaningful result.

I do not have any experience with open-source, so it will take a while to get the ball rolling, but I am hoping experienced people can help me out with this challenge.

I have a discord group for this : https://discord.gg/JadzgDH

And this is the github : https://github.com/jeltedeproft/Norii

Many thanks!
How to apply gaming engine in Mario Kart
Published: 2019-10-05 06:58:10

Gaming engine of Mario Kart Tour not only depends on platforms, but it also breaks through the cultural barrier of video games - I don't know much about the racing, but I love Mario Kart Tour; it can break through the barriers of technology and money - it is a pixel-level independent game, but it is more attractive than many so-called 3A-level masterpieces. Is that smart narrative like other racing mobile games? The above works are certainly masterpieces of "narrative techniques", but more definitely, they are bound to be surpassed by later generations. Because the cleverness of "narrative technique" lies in its unpredictability, it may come from the inspiration eruption of one night, or from the product of comprehensive reflection on many ordinary works, its generation should not be achieved overnight, because Mario Kart Tour player needs to rack his brains to design, as well as the determination to seek new changes; even less, it can not be "a means of deceiving money". The accomplice of a marketing gimmick, because it can become more powerful only if it is simple.
How much did the Mario Kart Tour go to? Let's put it this way. Even in the lounge of the bathing center at the entrance of our community, the animation of the film is played in circulation. Yes, that's the one describing Mario characters occupation of the racing street. I was able to react [Mario Kart Tour Cheats](https://fundanemt.org/mario-kart-tour-cheats/). I once saw this difficulty in the AI setup of the encounter. It refers to the highest grade computer AI. Generally speaking, it is difficult to deal with, and if you can face the N's encirclement and suppression, you can still win the final victory, which usually means that you will become the object of worship.
10-tweet threads are the new micro blogs
Tags: discuss, webdev, javascript, react
Published: 2019-10-05 06:34:55

I recently stumbled across Chris's @chrisachard 10-tweet-thread about React hooks. It was pure genius. 

- Writing more in less helps stay on point without beating around the bush
- It helps readers consume more knowledge from less content
- Chances of consuming knowledge from a tweet is more when compared to a blog post. _(I read at least a 100 tweets a day whereas I only skim around ~10 blog posts a day)_

Blog posts are more suited for in-depth elaborate dissection of a topic. But I personally feel tweet threads make it easy to consume knowledge if the content format is short and a can be summarised.

In that spirit I am planning to write more tweet threads on short topics that fit into 10 tweets and share it here.


Here's my first thread — **CSR vs SSR**

{% twitter 1180313818825576448 %}

And second — **React Dev Tools**

{% twitter 1180324978278879232 %}

Would love to hear your thoughts on this.
How to be consistent with programming?
Tags: discuss
Published: 2019-10-05 06:26:21

Hey guys
I have recently been into development progress, and am struggling a lot. But at the same time, I feel like these competitions like Hacktoberfest are really big motivations for a coder like me, who likes to keep things simple. As things get really tough my motivation level drops to zero, and after some time I lose interest in that problem. Then I move on to the next problem and leave the previous behind.
After learning the basics,  when I try to dive into the complex part of let's say Javascript, React. I fail to do so.
I was hoping Anybody from the community can help me out in this regard, like what things am I doing wrong, or my approach to solving the problem is entirely wrong.
I would appreciate your people's precious guidelines and will welcome every harsh comment. So feel free to express yourself :)
Laravel 6 validation required if another field is empty
Tags: laravel
Published: 2019-10-05 05:37:51

We know laravel provide several in-built laravel 6 validation required_without . If you need to add validation rules like required if other field is empty in laravel then you can do it using required_without.

https://nicesnippets.com/blog/laravel-6-validation-required-if-another-field-is-empty