teleren/devto huggingface dataset:
Not Allowing Modifications to a File - GITLAB CE
Published: 2020-10-16 18:46:24

Sometimes you do not want devs to modify some files in your GIT repo, such as config files, CI/CD files, whatever.. To do that GITLAB EE (Paid version) has an option in the repo/general level but GITLAB CE (Community Edition) does not. 

We can achieve that in a easy way, by adding a file to our Self Hosted Community Edition Gitlab Server.

Go to your server and find your **“git-data”** folder.

```
~/git-data/repositories/GROUP_NAME/REPO_NAME.git/
```

Here we need to create a folder called **“custom_hooks”** .
Access the new folder and add a file inside it with the name **update**.
We are going to use an example to not allow modifications to the “gitlab-ci.yml” file.

Copy the following content to the file.

```
#!/bin/bash

refname="$1"
oldrev="$2"
newrev="$3"
result=0

if ! [ "$oldrev" = "0000000000000000000000000000000000000000" ] ; then
    excludes=( ^$oldrev )
else
    excludes=( $(git for-each-ref --format '^%(refname:short)' refs/heads/) )
fi

commits=`git rev-list $newrev "${excludes[@]}"`

for commit in $commits
do
  fileci=`git show --pretty="" --name-only $commit|grep gitlab-ci`
  if [ "$fileci" != "" ] ; then
    echo "####################################################################################"
    echo "Error: THE FILE GITLAB-CI.YML MUST NOT BE UPDATED !!"
    echo "CHECK WITH THE GITLAB ADMINISTRATOR IF YOU WISH SO"
    echo "####################################################################################"
    result=1
  fi
 
done

exit $result

```

So here everytime someone tries to push commits to gitlab that contains this specific file with the name gitlab-ci an error will be presented to the user not allowing that push.
Creating Mockups with InkScape
Tags: webdev
Published: 2020-10-16 18:25:01

InkScape is a great tool for creating vector graphics with low-specs computers. But can you go a step further and create mockups? Yes, totally. Should you? Maybe not. Its distinct lack of features to collaborate in a team might be a turn off for teams, but as an independent developer this is a side of InkScape I have just started to explore this year.

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

It would be nice to have multiple artboards for comparing different views or a better support for typography (on Windows, InkScape can't find my custom fonts for some weird reason?) and icons have to be imported one-by-one, not to mention that there are all kind of weird bugs when you work with big files, but at the end of the day I still love working with it. It gets much easier when you create templates that already contain commonly used assets (color palette for this projects, correctly configured document properties, sytem & social icons, etc.) on a hidden layer to workaround the aforementioned issues a little. 

I feel like there is so much untapped potential in InkScape, but at the same time I am aware that the way I use it nowadays is not what the developers of this software had in mind. Maybe this is a sign that I should move on to something else that's better suited for creating mockups. Guess that's just another case of old habits die hard :)
#Hacktoberfest 2020
Tags: hacktoberfest
Published: 2020-10-16 18:46:23

## What I Learned From Hacktoberfest

When join the Hacktoberfest I have learned a lots in contributing for open-source project, help another people to grow-up and developing their own project. I also help my project's friend in open-source concept. Hacktoberfest have helped many people around this month. It is nice to join this event next year! Thank you #Hacktoberfest2020
Memoization in JS at function level
Tags: javascript, webdev, react, angular
Published: 2020-10-16 18:45:24

I recently encountered an interesting problem wherein you need to achieve a simple memoization at a function level.

Explaining the problem first,

Let's suppose you have been given a function for summation of 2 numbers
```
add = (a, b) => {
 return a,b
}
```
You have to write a function let's suppose memoize which receives a function
```
function memoize(func) {}
```

Input to the problem
```
let mem = memoize(add);
console.log(mem(1,2)) => 3
console.log(mem(2,4)) => 6
console.log(mem(1,2)) => 3
```

**So, problem is you need to complete the memoize function to return the output but the catch is if the input params are already being computed then you don't need to compute them again**

**Solution**

So, let's start revising some core concept of JS i.e every function is ultimately an object in JS,🧐🧐

Let's think how we can use this concept in our function memoize
```
function memoize(func) {

  // Since, we can have a property in objects, right?
  if(!memoize.preInputs) {
    memoize.preInputs = []
  }

return function() {
        for(let i = 0; i < memoize.preInputs.length; i++) {
          if((memoize.preInputs[i]['arg1'] === arguments[0] && 
            memoize.preInputs[i]['arg2'] === arguments[1]) || 
            (memoize.preInputs[i]['arg1'] === arguments[1] && 
            memoize.preInputs[i]['arg2'] === arguments[0])) {
            console.log('precomputed');
            return memoize.preInputs[i]['result'];
          } 
         }
         memoize.preInputs.push({
              arg1: arguments[0],
              arg2: arguments[1],
              result: func(arguments[0], arguments[1])
            });
         console.log('newly calculated');
         return memoize.preInputs[memoize.preInputs.length - 1].result;
        }
```

Now, let's try using the output,
console.log(mem(1,2)) 
=> newly calculated
   3
console.log(mem(3,4))
=> newly calculated
   7
console.log(mem(1,2))
=> precomputed
   3

So, that's it this is a one way by which you can achieve this, I am pretty much sure you can have other ways also

Bye!
Happy Coding !!😁😁😁
[Question] how should I learn Elixir as a self-taught front-end developer? 
Tags: elixir, help, learn
Published: 2020-10-16 18:28:09

Hi, developers 👋
I'm a self-taught front-end developer so I don't have any CS degree fundamentals or any previous knowledge on back-end. Last week I started learning Elixir and my approach was to read the documentation but that seems a bad approach?

Do you have any useful tools or guides that might help me?
I've made the same question on [Twitter](https://twitter.com/HeyItzaMi/status/1317161038517817344?s=19) so, if you feel like, you can also comment there for extra exposure and to help someone who might not have a dev.to account.

I appreciate any help in advance 🙏
Hacktoberfest
Tags: hacktoberfest
Published: 2020-10-16 18:24:03

## What I Learned From Hacktoberfest

I was a newbie to open source and always wanted to learn. But never got time. You will rarely get time to do anything which is not important and not having a deadline. I saw it as a great opportunity to learn open source. I registered and since it has deadline I learn to do pr and resolved many issues. Always start with easy one. I started with my-first-pr repo in github and then moved to my profile of my learning. I resolved typo in documentation of pyton library PyLearn, then contributed to many such issues. It is a fun and now I daily resolve some issue. You can use open-source to learn new things faster by resolving issues of that tech. Open source is fun:)
Shell - golang-migrate-helper.sh
Tags: shell, go
Published: 2020-10-16 18:18:30

This script helps to manage ".sql."

**Feature:**

* Load the directory containing SQL files and the database source from .env.
* Limit "create" to SQL.

{% gist https://gist.github.com/takakd/5e37bee44f36630c03d1e8e2887db8ce %}
My Hacktoberfest Story
Tags: hacktoberfest
Published: 2020-10-16 18:15:20

## How did I come to know about Hacktoberfest 2020?

I used to hear a lot about the opensource community, but I was always afraid to contribute to this community. Once I tried to contribute, but my PR was immediately closed, and I never tried again. Fast forward to 29th September 2020 when my colleague told me about Hacktoberfest 2020. I said I'll see if I'll be able to make four contributions in a month (where I couldn't even manage to make a single contribution before).

## How did I make my first opensource contribution?

I didn't specifically target this Hacktoberfest for my first opensource contribution. We were using a Python library [Flask-Mobility](https://github.com/rehandalal/flask-mobility) in our application, and our application is currently running on Python 3.5, and we are planning to migrate it to Python 3.8 soon. But this library didn't have support for Python 3.8.

We had a team discussion about it, and we decided that first, we would clone this library and try to run the tests in Python 3.8. If all the tests pass, we'll let the author know that you can add support for Python 3.8. So I cloned the library and ran the tests in Python 3.8, and all the tests passed. 

Then I thought to myself, that this is an excellent opportunity for me to make my first opensource contribution. So I made the changes myself and opened a PR: [Add support for Python 3.8](https://github.com/rehandalal/flask-mobility/pull/42). I was nervous that it might end up being closed (as it happened in the past), but to my surprise, it was accepted and merged within a day.

After experiencing how easy it was to make an opensource contribution, I started making more contributions. And within a couple of days, I had completed my target of four PRs. 


## Hacktoberfest 2020 Completion:


![Hacktoberfest 2020 Completion](https://dev-to-uploads.s3.amazonaws.com/i/089xh2zeao80bf4l2bhf.png)


## Conclusion

I would like to conclude my first blog post with this quote:


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ur02e5omkcfsc6vxbmx4.png)
Hacktoberfest 2020 Experience
Tags: hacktoberfest
Published: 2020-10-16 18:13:52

I got to know about Hacktoberfest from one of my friends and to be honest I had no clue what it was. But the idea of contributing to open source projects fascinated me a lot and I got to know about the steps to achieve the same. I learnt how to use Git and Github to make pull requests, to find solutions of the problems for others projects. 
Hacktoberfest really helped to take my first step into the open source community. I would like to thank DigitalOcean for creating this awesome platform for the awareness of Open Source contribution.
My First Hacktoberfest Experience
Tags: github, hacktoberfest, devops, opensource
Published: 2020-10-16 18:07:18

Before I started contributing at Hacktoberfest, I always thought it would be difficult contributing at Open Source. Since I was a beginner.  After I learned how to use GitHub, it felt easy. Although it was a bit difficult at start, it gradually became easy as I started contributing in more repositories. I felt proud of myself whenever any of my contribution got merged. And today when my first 4 pull requests passed the review period, I feel extremely delighted and proud of myself that I finally did it.
My Experience of hacktoberfest.
Tags: hacktoberfest
Published: 2020-10-16 18:01:59

##
My Experience with hacktoberfest is really good and amazing.
Because initially I was totally concentrated on tshirt😁 but in other word that tshirt was my motivation.
One of my friend make me aware with this open source contribution fest and I started using git from current year, so making open source contribution is like learning new branch(contribution one) of git!
After fest started I made mind to find out best repo according to my skills or tech and than Initially I used to read whole readMe.md file and than I started my idea of contribute according to the issues already mentioned in git repo or if a had new one in my mind.
And I made my 4 PR's in 3 days and whole working was really amazing for me🙏.
Hacktoberfest2020
Tags: hacktoberfest
Published: 2020-10-16 17:41:30

## What I Learned From Hacktoberfest

I learned the art of helping other developers(open-source) through the platform of Github

<!-- What did you learn that can help others contribute to the project you worked on?
 
It helped to know more about different programming languages used in a project. 

What did you learn that can help the users of that project?! -->
What are the pros and cons of StimulusJS and AlpineJS?
Tags: discuss, rails, alpinejs, stimulus
Published: 2020-10-16 17:37:21

---
title: What are the pros and cons of StimulusJS and AlpineJS?
published: true
description: Should I be using AlpineJS instead of StimulusJS?
tags: discussion, rails, alpinejs, stimulusjs
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/0me4sjocixm3np0nbfjr.png
---

I've been using StimulusJS heavily on two rails apps I have been working on and honestly, I'm loving it. But, I have been reading and hearing a lot lately about AlpineJS. What are the pros and cons? Should I be using AlpineJS instead of StimulusJS?
Hack-To-Fest
Tags: hacktoberfest, github, opensource, digitalocean
Published: 2020-10-16 17:30:52

## What I Learned From Hacktoberfest

I learned that it is really simple and easy to contribute to other developers in their repos.
The following were the different contributions made to different repositories:
1)Added: A web tool in repo
2)Added: A bootStrap stylesheet link
3)Contributed: In Jsp project user registration file
4)Contributed: In Snake game code in Python
5)Added: A tool in repo
Hacktoctober fest 2020 XP
Tags: hacktoberfest
Published: 2020-10-16 17:26:49

#Experience about Hacktoctober fest 2020 as a student.
##Foundation:
I never had any great or professional education in field of computer science, yet I learnt about web development online and made through *hacktoberfest* 2020 and learnt about pulling repos on
```
Github..
```
Well, I'll be updating with my overall reward experience here soon!
EuroPython 2020: All edited videos are online plus Featured Video of the Week
Tags: europython, videos, python, django
Published: 2020-10-16 17:25:00

We’re happy to announce that all edited videos of this year’s conference are now available on our [YouTube channel](https://europython.tv/).

{% youtube CvbQArKEFes %}

👉 [EuroPython 2020 Playlist](https://www.youtube.com/watch?v=CvbQArKEFes&list=PL8uoeex94UhHgMD9GOCbEHWku7pEPx9fW)

We have 131 videos available in total, covering a very broad set of Python topics, so there’s going to be something interesting for everyone.

We hope to see you all again next year and perhaps even have a few more people attending EuroPython 2021 Online, now that the format has proven successful. 

We also want to feature another EuroPython 2020 speaker from DEV community, this time it's Bhagvan Kommadi talking about "Telehealth Platform : Python & Django powered".

{% user bhagvank %}

Stay Safe & Enjoy,

–
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/

---

# Telehealth Platform : Python & Django powered

{% youtube RBERo-AFkDw %}

### Description
We have built an AI-powered platform (python &amp; django) for doctor's community and Telehealth support for patients during COVID-19 lockdown. The doctor's community interacts related to cases and triage for different patient cases. They can extend Telehealth support using medical practice management solutions. Patients can order medicines online through integrated pharmacies on the platform. AI Platform has digital, voice, and knowledge assistants to provide information to the doctor. Historical
data is used for predictive analytics by the machine learning platform. The platform helps healthcare enterprises in the following:

1. Deploy voice tech to facilitate clinical documentation
2. Reduce physician's administrative burden
3. Increase patient volume and billable revenue
4. Eliminate transcription costs
5. Voice to increase touchpoints and increase patient engagement

##### Note
License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/
WordPress Developer at RadishLab
Tags: wordpress, php, javascript, laravel
Published: 2020-10-16 17:24:48

We're currently looking for a full-time, full-stack WordPress developer.

Skills:
- Must speak English fluently
- 5+ years of Wordpress development
- 3+ years of front-end: HTML, CSS/SASS, JavaScript
- RESTful APIs integration
- Experience with the MVC architectural pattern
- Comfort with the terminal
- Advanced use of Git

Apply here: 
https://radishlab.recruitee.com/o/full-stack-developer
Add Properties to functions
Tags: javascript, webdev, beginners, codenewbie
Published: 2020-10-16 17:23:10

```js
function greetings() {
  console.log("hello world");
  greetings.counter++;
}
greetings.counter = 0;

greetings();
greetings();

console.log(`Called ${greetings.counter} times`); // Called 2 times
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
My First time at Hacktoberfest
Tags: github, hacktoberfest, devlive
Published: 2020-10-16 17:20:25

Contributing for the first time at Hacktoberfest was difficult. I didn't have any idea on how to make a pull request or how do fork a repository, or anything. In simple words, I was just clueless, like any other beginner. But I wanted to contribute this time so I searched the entire Google on how to create a pull request, how to create a repository, how to use GitHub. 
Today when I successfully completed the review period of my 4 Pull Requests and proud of myself that I did it!
Tagged Template Literals
Tags: node, javascript, codenewbie, webdev
Published: 2020-10-16 17:12:47

Hello Everyone 👋,

Tagged template literals is an es6 feature which allow you to tag a template to a function.

If you are from react/graphql world you would have seen the below syntax.

{% gist https://gist.github.com/Kannndev/560dec48ae205c793372ee000af90d4c %}

Even If you do not know this syntax follow along you will understand.

Here styled.button and gql are actually just functions.

See the below example

{% gist https://gist.github.com/Kannndev/19a76d00896dc71d8e96df922b4f96ff %}

Whenever a tagged function is called the first argument will be array of strings which is split on the interpolation.

Notice that we have used second argument with rest operator because each interpolation value will be passed as an argument to the function. Imagine there are 10 interpolation in a string getting each argument separately is not a good practice.

This can be used to completely transform the string.

Consider a use case while rendering a block in the html all its dynamic values needs to be made bold. We can write a simple function with tagged template easily to preprocess the string for us.

{% gist https://gist.github.com/Kannndev/f4f81c23b3809dfdb624c2fba32633f9 %}

Note: There will be always one value more in the strings array then the values.

Check out these awesome libraries that use tagged templates:
[Styled-Components](https://github.com/styled-components/styled-components)
[Common-tags](https://github.com/zspecza/common-tags/)
[i18n-tag](https://www.npmjs.com/package/es2015-i18n-tag)
[graphql-tag](https://github.com/apollographql/graphql-tag)

Please like and share if you find this interesting.
Devfest Day-1 | Web
Tags: devfest, devfestindia, gdg, devfest2020
Published: 2020-10-16 17:12:30

##Devfest Day-1 *WEB*
Devfest day-1 web went well got to learn lot of things & firebase for first time. And I have to admit firebase looks very handy. Will surely try in upcoming projects.
Why an Omnichannel Strategy Is Critical in 2020
Tags: strategy, omnichannel
Published: 2020-10-16 17:08:28

Making every customer touchpoint work in harmony takes work, but a satisfied customer is worth it.
[Read more...](https://auth0.com/blog/why-an-omnichannel-strategy-is-critical-in-2020/?utm_source=content_synd&utm_medium=sc&utm_campaign=omnichannel_strategy)
How to Create a Online Payment Gateway
Tags: psp, payment
Published: 2020-10-16 17:00:33

Thinking about setting up an online payment solution form for your business? To achieve this task you may be choosing between third-party solutions or developing your own in-house product. Each selection has its own set of pros, cons, and expenses that you’ll want to deal with as you settle the right solution. Here’s what you need to know about adopt the best solution for your business, setting up an online payment solution, and then optimizing it to make pleasant customers experience.
What is a payment gateway?
A payment gateway is a complex system that enables debit/credit card payments for online and offline businesses. It sets an uninterrupted passage of such transactions by encryption of sensible data and transferring them between a customer, an online shop, and a bank. The shop acts as a payment gateway and the bank as a payment processor. Hence, the payment gateway establishes communication between the three participants of the payment process. It safeguards every transaction runs safely by applying various anti-fraud tools and acting under the PCI-compliance.
From the tech perspective, the payment gateway is a layer above the payment processor. It receives data from the user and, redirects the payment to the processor in an understandable format.

Payment gateway vs. payment provider

It is crucial to outline the difference between the payment gateway and the payment provider. While the first is software, the second is the capacity to use this software for its intended function.
So, writing a working program doesn’t mean you can embed it into your eCommerce or commercialize it to other merchants immediately. First, you need to go through the certification process and connect with a payment processor. Note, building software is not a challenging assignment. In contrast, the registration procedure may take months or even years. Only after obtaining all the necessary approvals can you act as a provider.
How to become a payment service provider
So here are 6 steps you should do to become a payment service provider:
Step 1. Set up infrastructure
Step 2. Integrate with a payment processor
Step 3. Develop CRM
Step 4. Implement tokenization
Step 5. Get 3DS certificate from EMVCo 
Step 6. Apply for PCI
And remember, Integrate with many processors. The more payment processors you link with, the more opportunities you give to your merchants. Specifically, the sellers will be able to choose among different acquiring banks to open an operating account. Also, they will have a choice of transaction fee rates.
You can draw inspiration from some successful [European Payment Service Providers](ttps://mynetfreedom.com/best-payment-service-providers-in-europe). 
Good Luck!
What are the top 10 Java SpringBoot interview questions?
Tags: java, computerscience, career, tutorial
Published: 2020-10-16 16:46:43

1) What is Spring Boot?

2) What are the advantages of Spring Boot?

3) What are the features of Spring Boot?

4) How to create Spring Boot application using Maven?

5) How to create Spring Boot project using Spring Initializer?

6) How to create Spring Boot project using boot CLI?

7) How to create simple Spring Boot application?

8) What are the Spring Boot Annotations?

9) What is Spring Boot dependency management?

10) What are the Spring Boot properties?

Meet The Experts for Better Guidence : https://nareshit.com/spring-online-training/
What was your win this week?
Tags: discuss, weeklyretro
Published: 2020-10-16 16:43:09

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

It's almost the weekend!


**Looking back on your week — what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄


**Happy Friday!**

![Happy Skeleton](https://media.giphy.com/media/okfvUCpgArv3y/giphy.gif)