teleren/devto huggingface dataset:
Pardus & Ansible
Published: 2020-08-20 10:31:31

Ansible’ı yüklemek için(Debian,Pardus);

    sudo apt update -y

    sudo apt install ansible -y

daha sonra bu bilgisayar ssh-key üretip istemcilere bu ssh-key’i ileteceğiz.

    ssh-keygen -t rsa

    Enter file in which to save the key (/home/pardus/.ssh/id_rsa):
    /home/pardus/.ssh/id_rsa already exists.
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/pardus/.ssh/id_rsa.
    Your public key has been saved in /home/pardus/.ssh/id_rsa.pub.
    The key fingerprint is:
    SHA256:EgUoPrRq9lFTNoWfVnm9MC+gGPOQnXHhJ4voCOiEq+s pardus@ansible-server
    The key’s randomart image is:
    +—[RSA 2048]—-+
    | …*oooo . |
    | o . @ oo+ + . |
    | o o + O +oo.+ .|
    |. = o o.*. +. o |
    |.+ o. o.S. . . |
    |++ .. o. |
    |+.. .. . |
    |. . |
    |+E |
    +—-[SHA256]—–+

“/home/pardus/.ssh/id_rsa” ile ssh-key’in oluşturulacağı yer belirlenir, standardına dokunmadan ilerliyoruz. “passphrase” sorusuna herhangi bir parola girmeden devam edelim, key göndereceğimiz için parola ile bağlantı yapmayacağız.

Daha sonra bu oluşturulan keyi istemciye göndermemiz gerekiyor, bunu için;

    ssh-copy-id istemci@ip_adresi

ile gönderim sağlanır.

Not: Daha önce gönderim yapıldı ve yenilenmesi isteniyorsa -f parametresi kullanılır, yani;

    ssh-copy-id -f istemci@ip_adresi

şeklinde kullanılır.

Ansbible standart dosyalarını /etc/ansible/ dizini altında tutar, biz ise ile çalışmak için bir dizin oluşturacağız;

    cd ~

    mkdir ansible && cd ansible

    cp -rf /etc/ansible/* .

    pardus@ansible-server:~/ansible$ ls -la
    total 32
    drwxr-xr-x 2 root root 4096 Aug 13 18:58 .
    drwxr-xr-x 6 pardus pardus 4096 Aug 14 06:05 ..
    -rw-r–r– 1 root root 20265 Aug 13 18:54 ansible.cfg
    -rw-r–r– 1 root root 1022 Aug 13 18:58 hosts

ansible.cfg dosyasında “inventory” değerini;

    inventory = ./hosts

şeklinde değiştiriyoruz.

Daha sonra “hosts” dosyasına;

    [parduslar]
    192.168.122.86

şeklinde hostları ekliyoruz. Birden fazla istemci alt alta ip veya hostname şeklinde eklenebilir. Aynı şekilde benzer istemciler gruplanabilir. Örneğin Centos istemciler;

    [centos]
    192.168.122.42
    192.168.122.14
    192.168.122.57

şeklinde eklenebilir. Bu sayede gönderilecek görev bu gruplamaya göre iletilebilir. Yani centos istemcilere ayrı, ubuntu istemcilere ayrı veya all seçeneği ile tüm istemcilere aynı görev gönderilebilir.

Gelelim görev göndermeye, bunun için ansible dizininde iken;

    ansible -i hosts -m ping all

komutu ile ping atabiliriz. Bu komutun çıktısı;

    192.168.122.86 | SUCCESS => {
    “changed”: false,
    “ping”: “pong”
    }

şeklinde olacaktır.

    ansible -i hosts -a “ip a” all

şeklinde “-a” parametresi ile karşıdaki istemcilerde komut çalıştırışabilir. “all” parametresi yerine;

    ansible -i hosts -a “ip a” parduslar

şeklinde sadece parduslar grubunda olan istemcilere uygulanır.
Reason Why Everyone Choosing Magento 2 Gift Card for Ecommerce Store
Published: 2020-08-20 10:26:24

[Magento 2 Gift Card](https://www.mageants.com/gift-card-extension-for-magento-2.html) is the best feature for customers in today’s busy life as it allows them to create and send unlimited gift cards to their loved ones via email or post.
 
**Key Features:-**

1. Create any number of unique gift card templates using Gift Card for Magento 2
2. Easily customize the gift cards as per your needs and occasion.
3. Option to attach custom message along with the generated gift card
4. Send the gift cards to your family and friends via email, post, or print out, etc.
5. Admin can manage and track all the gift cards purchased on the website.
How do you manage bookmarks?
Tags: webdev, discuss, productivity
Published: 2020-08-20 10:22:39

---
title: How do you manage bookmarks?
published: true
description: 
tags: webdev, discuss, productivity
cover_image: https://addons.cdn.mozilla.net/user-media/previews/full/190/190805.png?modified=1563241005
---
I'm currently using Chrome's default bookmark functionality by sorting resources in folders like 'Articles', 'Designs', 'Tutorials', etc.

How do you manage your bookmarks?
Do you use any external tool/extension for that or are you fine with what the default browser comes with?
serverless offline golang setup
Tags: serverless, go
Published: 2020-08-20 10:21:56

Recently i have faced an issue in running the serverless application built using GoLang in offline(locally).

So, i just want to share the detailed steps 

# Initial Setup

Pre requisites
* Serverless package should be installed globally
* Golang
* Make sure you're in your ${GOPATH}/src directory

take a sample application setup from aws examples
```
$ serverless create -t aws-go-dep -p <your project name>
```
Add a Makefile in root directory
```
.PHONY: build clean deploy
build:
	env GOOS=linux go build -ldflags="-s -w" -o <your bunary path>
clean:
	rm -rf ./bin
deploy: clean build
	sls deploy --verbose
```

Add package.json file in the project root directory
```
{
    "name": "lambda-golang-offline",
    "description": "To run the golanf lambda service locally",
    "version": "1.0.0",
    "scripts": {
        "start": "node ./node_modules/.bin/serverless offline start --useDocker",
        "watch": "nodemon --watch ./ -e go,js --exec make build"
    },
    "devDependencies": {
        "nodemon": "^2.0.3",
        "serverless": "^1.70.0",
        "serverless-offline": "^6.1.5"
    }
}
```
Now install the npm dependencies using the command
```
$ npm i
```
Now build the binary
```
$ make build
```
Now start the server
```
$ npm start
```
for the first time it will take time. wait and then hit the api in postman

while development use `watch`
```
$ npm run watch
```
serverless.yaml looks like this
```
service: returns
frameworkVersion: '>=1.28.0 <2.0.0'
provider:
  name: aws
plugins:
  - serverless-offline
package:
  exclude:
    - ./**
  include:
    - ./bin/**
functions:
  return:
    runtime: go1.x
    handler: <your handler>
    environment:
      env: ${opt:stage, self:provider.stage}
      IS_OFFLINE: false
    events:
      - http: 
          path: /<desires path>
          method: post
          cors:
            origins:
            - "*"
            headers:
            - Content-Type
            - X-Amz-Date
            - Authorization
            - X-Api-Key
            - X-Amz-Security-Token
            - X-Amz-User-Agent
  
```
if you are planning to use api gateway endpoints in front end then you should add the cors policy in serverless.yaml file
instaed of `*` use the relevant origin names

you can find all the files in [git](https://github.com/manikanta4a9/serverless-golang-offline)

**Next Post will be on Serverless lambda setup with typescript and mysql**
How to Importing Sites from SiteBuilder 4.5
Tags: webdev, productivity, sideprojects, webpack
Published: 2020-08-20 10:05:26

If you have a site created with SiteBuilder 4.5, you can import it into www.amberit.org shared web hosting Presence Builder.

Note: The import of sites from earlier versions of SiteBuilder or other content management systems is not supported.
If your site was created with an earlier version of SiteBuilder (4.4 or earlier), and you would like to transfer your site to www.amberit.org shared web hosting, you can do the following:

Contact our support team with a request to upgrade your account to the latest version of Presence Builder.
Transfer your site manually by copying and pasting the content.
During site import, most parts of the site structure and content can be transferred successfully. However, we cannot guarantee that all content will be transferred.

In most well-known cases, the following elements are imported successfully:

Site map.
Static pages, including links and images in text modules. Note that text blocks exceeding 30 kilobytes may be cut; therefore, some parts of the text may be missing.
Banner (if it is not a custom image).
The slogan, site title.
Logo (if it is not a custom image).
Footer text.
Meta information (keywords, description).
The other modules can be imported only as text widgets with static content, links, and images. Buttons will not work. The image gallery structure can be imported without images.

To import a site from SiteBuilder 4.5:

Open the Presence Builder editor, and on the topic selection screen, click Import Site from SiteBuilder 4.5.
Type the Internet address (domain name) of your site that you want to import. For example http://example.com.
Select the checkbox to confirm that you are aware of possible import issues, and click Import Site.
After the site is imported, review and edit it as required. ( In Presence Builder, you can change almost any element of your website. Most of the elements are changed in place - you open a page where the element is used, edit it, and see the result right away. Site-wide elements, such as those inserted in DESIGN areas are changed in one place but the changes are applied to each page of your website. )
Note: If you are using Internet Explorer, we strongly recommend that you avoid using browser zoom to change the size of the text displayed in your browser window. Please note that websites in Presence Builder will perform and look best at normal zoom (100%).

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

You can compare the imported site version with your original site and add the missing information manually.

When finished with editing your website design and content are ready to be published to the Internet, click Publish in the top right corner of the main menu.

Presence Builder will publish your website automatically to the location specified by our system.

If you are publishing your new site to the same subscription on which your site created with SiteBuilder 4.5 was hosted, the old site will be overwritten.

Full article: https://www.amberit.org/k1/how-to-importing-sites-from-sitebuilder-4-5/
Getting a comment right
Tags: comments
Published: 2020-08-20 09:58:31

---
title: Getting a comment right
published: true
description: Trying to write the perfect short comment
tags: comments
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4lazazyxb4tvpf1prnx3.jpg
---

I love code comments, and think of them as <q>just enough documentation for the dev at that particular moment</q>. They're also, of course, where you explain yourself to your peers and future self.

Today, I needed to switch a dialogue window from being `position: fixed` to `position: absolute` I wasn't quite sure if this would turn out to bite me in the arse or not. So I needed to add an unambiguous comment, for future me (_hate_ that guy) to read. Here's how that went:

```scss
.dialog {
  position: absolute; // Was fixed
  top: 50%;
  transform: translate(-50%,-50%);
  width: 90%;
}
```
Hang on - that's not right. It looks like the element was fixed at some point in the past. I'll try quotation marks:

```scss
.dialog {
  position: absolute; // Was "fixed"
  top: 50%;
  transform: translate(-50%,-50%);
  width: 90%;
}
```
Oh God - that just looks sarcastic. I'll type the whole thing out:

```scss
.dialog {
  position: absolute; // Was position: fixed
  top: 50%;
  transform: translate(-50%,-50%);
  width: 90%;
}
```
That colon could be missed in a skim-read and mistaken for bad English. I'll try quotation marks again:

```scss
.dialog {
  position: absolute; // Was "position: fixed"
  top: 50%;
  transform: translate(-50%,-50%);
  width: 90%;
}
```
That'll do, I guess.
How to pass remote technical interview in 2020
Tags: career, hiring
Published: 2020-08-20 09:36:07

Talking with dozen recruiters and interviewing hundreds of engineers in past 6 months, I noticed there are few patterns where engineers make mistakes when attending technical interviews. I wrote a guide on how engineers can prepare for the technical interview. I'd love to hear any feedback what has been working for you guys and share any tips you might have.
reply

https://remotesome.com/blog/how-to-pass-a-technical-interview
NXP i. MX RT1050 EVK BSP(Board Support Package) Execution Instruction.
Published: 2020-08-20 09:19:13

**Introduction:**

The mainly-used resources of this board are shown as follows:

- MCU：MIMXRT1052DVL6A. Main Frequency 600MHz,
- Memory：256MB SDRAM、512MB Hyper FLASH
- Common-used peripherals:
  - Motion Sensors：FXOS8700CQ
  - LED
- Common-used interfaces ：USB、SD Card、Ethernet、LCD、Camera.
- Debug interface：Standard JTAG/SWD. 
  For more details about this board, please refer to https://www.nxp.com/

**Peripheral Condition:**

Each peripheral supporting condition for this BSP is as follows:

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


**Instruction**

**Get Started:**

This BSP provides MDK 5 and IAR projects for developers and it supports the GCC development environment. Here's an example of the MDK5 development environment, to introduce how to run the system. 

Hardware Connection:

Use a USB cable to connect the development board to the PC and turn on the power switch.

Compile and Download：

Double-click the project.uvprojx file, to open the MDK 5 project, compile and download the project to the board. 

> By default, the project uses the CMSIS-DAP to download the program, when the CMSIS-DAP connects the board, clicking the download button can download the program to the board. 


**Running Results:**

Once the project is successfully downloaded, the system runs automatically. The green LED on the board will flash periodically.

Connect the serial port of the board to the PC, communicate with it via a serial terminal tool(115200-8-1-N). Reset the board and the startup information of RT-Thread will be observed: 


```
 \ | /
- RT -     Thread Operating System
 / | \     4.0.1 build May 28 2020
 2006 - 2020 Copyright by rt-thread team
``` 


This BSP only enables GPIO and serial port 1 by default. If you need more advanced features, you need to configure the BSP with RT-Thread  [Env tools](https://www.rt-thread.io/download.html?download=Env), as follows: 


**Advanced Features:**

1. Open the env tool under BSP.

2. Enter menuconfig command to configure the project, then save and exit.

3. Enter pkgs --update command to update the package.

4. Enter scons --target=mdk4/mdk5/iar command to regenerate the project. 

Learn how to use RT-Thread Env, click  [Here](https://github.com/RT-Thread/rtthread-manual-doc/blob/master/env/env.md).

RT-Thread Contact Info:

 [Website](https://www.rt-thread.io/)  |  [Github](https://github.com/RT-Thread)  | [Twitter](https://twitter.com/rt_thread) |  [Facebook](https://www.facebook.com/RT-Thread-IoT-OS-110395723808463)   |   [Youtube](https://www.youtube.com/channel/UCdDHtIfSYPq4002r27ffqPw
)
Top 10 AngularJS Frameworks To Use In 2020
Tags: angular
Published: 2020-08-20 09:17:47

Introduced and maintained by Google, AngularJS was founded in 2012. It is an open source JavaScript framework used to build web and mobile apps. Angular has emerged as the greatest resource in front-end web development. It is popular because of its flexibility, scalability and easiness to learn as a new JavaScript framework. Today most of the companies prefer AngularJS to build web apps because of its amazing features and available frameworks. Before we dig into AngularJS frameworks, let us see the amazing features of it.

#Some Amazing Features Of AngularJS-
**1. MVC Architecture-**
AngularJS makes use of MVC(Model View Controller) for web apps development. It can string the app code together that saves development and launch time of web apps. 

**2. Most User-Friendly-**
AngularJS framework can build high-end, impressive websites with extra features using less code. This framework is user-friendly and helps parallel-working teams to manage directives that saves time and effort.

**3. Two-Way Data Binding-**
Two-way data binding function of AngularJS rapidly impacts on app if there is any change in user interface. These changes include user actions, module changes and browser events, it completely updates the essential patterns.

**4. Easy Testing-**
Testing is more easy with AngularJS. Module separation attribute allows you to implement automated testing and load required services in a simple manner.

**5. Compatible With All- Mobile, Desktop, etc-**
AngularJS makes it simple to function on the client-side offering compatibility with mobile browser and desktop. The framework doesn’t require backend modifications thus can be used for any project. 

**6. Allows Building Several Modules-**
AngularJS is popular because of its amazing feature that allows to build several modules. Developers can build several modules by using a single app and all these modules run as an entire application.

**7. Support of Google Community-**
AngularJS is supported by a massive AngularJS community on Google+. This massive community is of expert and professional AngularJS developers who have the ability to create enhancements and updates with an open-source framework. 

#Top 10 AngularJS Frameworks-
What if there is a programming code that can selectively change or add features in an application. This is possible with the help of frameworks. You can easily add or improve functionality which was previously possible by writing many lines of code. Knowing the details of these frameworks is important, hence here we came up with the list of AngularJS frameworks that you should know. 

**1. LumX-**
LumX is a responsive front-end  framework based on Angular and Google Material design specifications. It is a best choice for web development to implement standard features like performance evaluation, improved functionality of apps and so on. If you are searching customized apps, then LumX is perfect choice as it gets made with Sass, jQuery, Bourbon, Sass and Neat.

Know more at- [https://solaceinfotech.com/blog/top-10-angularjs-frameworks-to-use-in-2020/]
React Routers! Which one should you choose?
Tags: react
Published: 2020-08-20 09:15:13

While working with React routers (**Router**, **BrowserRouter**, **HashRouter**, **MemoryRouter**), you ask yourself this question, which one should you select for your application.

I have a good share of experience with routers and i follow below simple rules to choose:

1. If you want to implement scenario based navigation on button click, then go with programmatic navigation by writing 
`history.push('/path')`. For this purpose, **Router** tag is suitable.

2. If you don't have programmatic navigation and want URL to change in Browser's URL bar/Search bar then go with **BrowserRouter**, for ex- *abc.com/home*, *abc.com/dashboard* 

3. If you want the URL to be static and not change then go with **MemoryRouter**. This way, you are not exposing URLs to outside world. Plus, **MemoryRouter** is meant for non-browser environments like Web apps that open in Mobile Webview.

4. Probably, you have observed that many websites' URL have **#** after domain name and then the remaining URL. The reason is that if you are working with a static application and don't want your app to make a server side request for navigation and navigating within the HTML content. Well, if you want to implement the same, use a **HashRouter**.
Whiskey Wednesday - Episode 1: Coding Motivation
Tags: podcast, career, motivation
Published: 2020-08-20 09:10:41

---
title: Whiskey Wednesday - Episode 1: Coding Motivation 
published: true
description: 
tags: podcast, career, motivation
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/298wnozwth32rhhrfxh1.jpg
---

## Whiskey Wednesday - 2020 June 10th

#### Episode 1: Coding Motivation

In this episode, we talk with Danny Thompson and Eddy Vinck about coding motivation and whether or not you need a college degree to get a job in tech.

{% spotify spotify:episode:0li7Ya8CsnpX0GudnnMuUy %}
Brief Introduction to the Installation Guide of Forem/Dev
Tags: selfhosting, opensource, tutorial
Published: 2020-08-20 08:48:55

In this series of **One-Stop to Install Forem**, I will be discussing the Installation procedure of Forem using Forem Documentation as the primary reference. 

---

The documentation provided by the Forem is one of the best starting points to wrap around this new Open Source, but having a semi-formal approach to discuss is also not a bad idea to me. So I am inclined to start one, and anyone who wants to improve this or have issues can contribute through the comment section.

From the past three months, I opened up various issues in the GitHub issues section to realize that most of the problems are related to a lack of my knowledge of the environment. Through this series, I will try to share my knowledge of experience to keep you on the right track.

---

> # Things to keep in mind

There are a few terms I might frequently use, so I would like to define them.

**Development Instance**:  Local Forem Instance on your laptop.
**Production Instance**: Online Forem Instance for online users.

---

By the end of this series, we aim to create our Forem instance. To achieve this first, we need to create a Local Forem Instance or a Development Instance. Then finally, this Development Instance will act as a medium or local reference to support our Production Instance, which will stay in Heroku or VPS.

For more information related to Development and Production refer to this [article](https://dev.to/flippedcoding/difference-between-development-stage-and-production-d0p)

---

Note: Depending on your OS or medium of installation, choose the next post.
#052 Kubernetes - Node Selector
Tags: kubernetes, devops, tutorial
Published: 2020-08-20 08:42:39

# Introduction
![intro](https://media1.tenor.com/images/f15057a41413c960db1f328ca5a732e3/tenor.gif?itemid=6203225)

this is part 52 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.

And I will cover lot of tools as we move on.
***
# Node Selector
When we use Node Selector? let's say I need to use a Node that require lot of resources like ram and speed. So I need to put it inside a high performant Node. How we know that a Node had high performance? we specify it in the yml file.
![node](https://dev-to-uploads.s3.amazonaws.com/i/cjihkq32ovz7xuks8wx3.png)
we give set inside label performance with value of high . in the pod we use nodeSelector and performance high.
But here the Node is not secured because any pod can have it. That's the difference between taints and node selector. 
***
# Files for this lab
all the files can be found on the repository of this journey , if you already have it just pull if not clone it.
Files can be found [here](https://github.com/OmarElKhatibCS/DevOpsJourney/tree/master/app_052)
![high](https://dev-to-uploads.s3.amazonaws.com/i/jjo4tv7ihiqhtaahw99j.png)
this is the high performance called app_052.yml and low called app_053_low.yml , the difference here is that one have performance high and the other is low.
***
# Lab
![lab](https://dev-to-uploads.s3.amazonaws.com/i/b1hyx2li74l8a1m2tbw3.png)

first we need to label our Node as high performance
![highNode](https://dev-to-uploads.s3.amazonaws.com/i/p6qk84mec5vt4s29bjl3.png)
```bash
kubectl label nodes minikube performance=high
```
second let's create our pod
![c1](https://dev-to-uploads.s3.amazonaws.com/i/isub2rsogqpn074cgtqu.png)
```bash
kubectl create -f app_052.yml
```
now let's see the pods
![getPo1](https://dev-to-uploads.s3.amazonaws.com/i/d72kvlc87z7fj67f9apq.png)
```bash
kubectl get pods
```
![c2](https://dev-to-uploads.s3.amazonaws.com/i/xpf0v9euxc9khdy2dj22.png)
```bash
kubectl delete pods test-nodeselector
kubectl create -f app_052_low.yml
kubectl get pods
```
first we deleted the old pod , then we create the new one with low performance . We can see that it's pending.