teleren/devto huggingface dataset:
Mengenal budaya lebih dalam dengan platform digital
Tags: magangkomatiksrd
Published: 2022-01-23 17:12:06

Indonesia terdiri dari beribu-ribu pulau yang terbentang dari Sabang sampai Merauke. Menurut data dari Badan Informasi Geospasial (BIG) tahun 2021 menyatakan jumlah pulau di Indonesia mencapai 17.000 pulau dengan 34 provinsi diantaranya. Tentunya masing-masing provinsi memiliki ciri khas dari di setiap daerahnya.  Ini membuat Indonesia memiliki keanekaragaman yang sangat melimpah dari segi suku, adat istiadat, budaya, bahasa, dan masih banyak lagi.

Seiring berkembangnya zaman, perlahan budaya yang dimiliki Indonesia mulai ditinggalkan. Budaya-budaya asing juga mulai berkembang di Indonesia kini masyarakat berlomba-lomba untuk mengikuti budaya luar, ini bisa menyebabkan terjadinya pergeseran budaya Indonesia. Sampai-sampau ada yang menganggap bahwa warisan budaya adalah hal yang kuno atau ketinggalan zaman. Tentunya hal in sangat disayangkan mengingat begitu banyaknya keanekaragaman yang dimiliki di Indonesia.

Kini sebagian besar hal merujuk kepada digitalisasi, termasuk juga budaya. Hal ini sebenarnya bisa dijadikan sebuah peluang. Dengan memanfaatkan teknologi kita bisa membuat suatu aplikasi ataupun web yang berisikan pesebaran budaya di Indonesia, sehingga sebagian orang bisa mengenal lebih jauh tentang budaya-budaya di Indonesia.
Laravel Tip (Select Columns using eloquent all method)
Tags: laravel, model, webdev
Published: 2022-01-23 16:39:13

## Select Columns through Laravel Eloquent
Now we can select the columns to run the when using the Model::all() method. No Need to use additional select() method

```
//Instead of this
$users = User::select(['id','name','email'])->get();
//Use this one
$users = User::all(['id','name','email']);
```
How Much Java-script Should I Know If I Want To Freelance As A Web dev? 
Tags: javascript, webdev, beginners, tutorial
Published: 2022-01-23 16:38:26

my collage will start from June, and they will be teaching c-plus-plus and JAVA ,But I want know Java-script for web devlopement..so how much to learn **_Java-Script_** for freelancing?
Markata Filters as Telescope Pickers in Neovim
Tags: python, cli, vim
Published: 2022-01-23 16:28:23

---
canonical_url: https://waylonwalker.com/til/markata-telescope-picker/
published: true
tags:
- python
- cli
- vim
series: til
title: Markata Filters as Telescope Pickers in Neovim
---

I often pop into my blog from neovim with the intent to look at just a single series of posts, `til`, `gratitude`, or just see today's posts. [Markata](https://markata.dev/) has a great way of mapping over posts and returning their path that is designe exactly for this use case.

[Markata listing out posts from the command line](https://images.waylonwalker.com/markta-list-todays-posts.png)

To tie these into a Telescope picker you add the command as the find_command, and comma separate the words of the command, with no spaces.  I did also `--sort,date,--reverse` in there so that the newest posts are closest to the cursor.

``` python
nnoremap geit <cmd>Telescope find_files find_command=markata,list,--map,path,--filter,date==today<cr> nnoremap geil <cmd>Telescope find_files find_command=markata,list,--map,path,--filter,templateKey=='til',--sort,date,--reverse<cr> nnoremap geig <cmd>Telescope find_files find_command=markata,list,--map,path,--filter,templateKey=='gratitude',--sort,date,--reverse<cr>
```

> NOTE telescope treats each word as a string, do not wrap an extra
> layer of quotes around your words, it gets messy.

![using this picker in neovim](https://images.waylonwalker.com/markata-list-telescope-picker.png)
Curl Command for Developer
Tags: curl, cheatsheet, linux
Published: 2022-01-23 16:16:26

This cheatsheet was collected famous CURL command for Software Developer. Exactly it's easy for checking and testing communicate between frontend and backend 

if you want to see more information or option. Please see in : [Curl man page](https://www.mit.edu/afs.new/sipb/user/ssen/src/curl-7.11.1/docs/curl.html)

## 1.Request with set value specific header


```
curl --header "X-MyHeader: 123" URL
```

## 2.Request with using cookie

```
curl -v --cookie "COOKIEKEY=VALUE" URL
```

## 3.Request with method and body


```
curl -X HTTPMETHOD -H "Content-Type: application/json" -d '{"key1":"value"}' URL

```

## 4.Request with Form-data


```
curl -X POST -H "Content-Type: multipart/form-data;" -F "key1=val1" URL

```

## 5.Request with Post File


```
curl -X POST -F 'file=@/file-path.csv' URL

```

## 6.Get HTTP Status Only

 
```
curl -s -o /dev/null -w "%{http_code}" URL

```

## 7.Get Response Header only


```
curl -I https://www.google.com

```

## 8.Get Response value of specific header 
(Example: for get content-type header)


```
curl -sI URL | tr -d '\r' | sed -En 's/^<u>content-type</u>: (.*)/\1/p'

```
Liman veya Ansible uzak yönetim için WinRM açma
Tags: liman, ansible, winrm
Published: 2022-01-23 16:03:26

Liman MYS ve Ansible gibi sistemler uzaktan Windows sunuculara erişim için WinRM gibi protokollere ihtiyaç duymaktadır. Windows'un güncel sunucuları kendi içerisinde OpenSSH sunucu servisini de seçmeli olarak sunabilmesine rağmen hala WinRM'in tercih edildiği de görülmekte.

Aşağıdaki çalışmada WinRM'i SSL'li bir şekilde 5986 portu üzerinden kullanılabilmesi için yapılması gerekenler gösterilecektir.

# İlgili betiğin Windows sunucuna indirilmesi ve kurulması

İlgili betiği Windows sunucusuna indirmek için aşağıdaki komutu **yetkili kullanıcı ile açılmış** _powershell_ veya _windows terminal_ üzerinden çalıştırmak gerekiyor. 

```
invoke-webrequest -Uri https://liman.dev/winrm -Outfile winrm.ps1
```

Bu adımdan sonra yetki edinmek için aşağıdaki komutu uygulamanız gerekmektedir.

```
Set-ExecutionPolicy Bypass -Scope Process -Force
```

Bu adımdan sonra güvenlik gereği sadece belirli IP'den WinRM isteğinde bulunacaksanız aşağıdaki komutu kullanmanız gerekmektedir. Eğer böyle bir kısıt bulunmuyorsa Instance parametresini kullanmayabilirsiniz.

```
.\winrm.ps1 -Instance "IP_ADRESI" 
```

Bu adımdan sonra belirttiğiniz IP Adresinden, 5986 portunu kullanarak SSL'li WinRM sorguları atabilirsiniz.
Docker Swarm vs node.js cluster
Tags: javascript, node, docker, cloud
Published: 2022-01-23 15:21:15

Out of boredom, I have started testing the performance of Docker Swarm vs Node.js cluster. I approached this with the expectation that the added overhead of Docker, with round-robin load balancer, will make the application slower. The machine I am running all the tests is an Intel i7 11700k running Linux 5.13.0-23 (Ubuntu), all defaults, and all tests are executed using node 17 Here are the results:

- single service instance: 9742.37 trans/sec
- 16 service instances: 27033.33 trans/sec
- single node application: 12418.70 trans/sec
- clustered node application: 18290.21 trans/sec

Frankly speaking, I didn't expect Docker Swarm to be faster. It's not only easier to use Docker Swarm (the code is exactly the same as for a single-threaded system), but is also very much more performant! Looks like a single-threaded application running as node.js process directly on top of the operating system is faster, but then the clustering makes it somewhat slower. Anyone knows why that is?

You can check the demo code [here](https://github.com/padcom/docker-swarm-perf-test)

Happy coding!
Hugo version error while deploying.
Tags: hugo, webdev, git, opensource
Published: 2022-01-23 15:19:40

I was building my personal website using a static site generator called [Hugo](https://gohugo.io/) and I faced a **hugo-extended version issue** while deploying it.

I found very less resources while I tried to resolve the issue and so I thought of sharing the way I resolved the deployment issue.

The **error** I faced - 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7c3932qqh3zfpnmst0pq.png)  
It was asking for a hugo extended version for the build and a normal hugo installation on your system will not help in resolving the issue.  

Check your hugo verion:
```
hugo version
```  

Then you need to install hugo extended from this [github repository](https://github.com/jakejarvis/hugo-extended or see this [docs](https://gohugo.io/getting-started/installing/).  

The installation can be done by **snap**. 

```
snap install hugo --channel=extended
```  

To check **hugo extended** version

```
snap refresh hugo --channel=extended
```  

Then do the build and deploy.  
Hope someone coming up with this issue find this helpful.
9 Useful JavaScript Array Tips and Tricks You Should Know
Tags: javascript, programming, beginners, webdev
Published: 2022-01-23 15:10:42

There are several very basic tips about Javascript arrays that will help you improve your Javascript skills. Now let's do a little coding...

**1.Reverse an Array**
```javascript
let name = ['Mike', 'Matt', 'Nancy', 'Adam', 'Jenny', 'Carl']
reversed = [...name].reverse()]
console.log(reversed)
['Carl', 'Jenny', 'Adam', 'Nancy', 'Matt', 'Mike']
```

**2.Sort Array**
```javascript
var names = ["Mike","Matt","Nancy","Adam","Jenny","Nancy","Carl"];
uniq = [...new Set(names)];
console.log(uniq)
['Mike', 'Matt', 'Nancy', 'Adam', 'Jenny', 'Carl']

//method 2

let uniqueArray = names.filter(function(item, pos) {
    return names.indexOf(item) == pos;
})

console.log(uniqueArray)

['Mike', 'Matt', 'Nancy', 'Adam', 'Jenny', 'Carl']
```

**3.Get random value**

```javascript
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.sort();


//Method 2 
let a =[ { firstName: 'John', age: 27 }, { firstName: 'Ana', age: 25 }, { firstName: 'Zion', age: 30 } ];

a.sort((a, b) => {
    return a.age - b.age;
});



```


**4.Intersection,Union,Difference of two arrays**

```javascript
arrA=[1,3,4,5]
arrB=[1,2,5,6,7]
let intersection = arrA.filter(x => arrB.includes(x));
console.log(intersection)
[1, 5]
```

**Union**

```javascript
let union = [new Set([...arrA, ...arrB])]
console.log(Array.from(union[0]));
[1, 3, 4, 5, 2, 6, 7]
```

Difference

```javascript
let difference = arrA.filter(x => !arrB.includes(x));
console.log(difference);
[3, 4]
```
**5.Merge Arrays**
```javascript
let fruits = ['banana','mango','apple']
let veggies = ['tomato','potato','onion']
let food = [...fruits,...veggies]
console.log(food)
['banana', 'mango', 'apple', 'tomato', 'potato', 'onion']
```

**6.Fill array with data**

```javascript
var newArray = new Array(10).fill('data');
console.log(newArray)
['data', 'data', 'data', 'data', 'data', 'data', 'data', 'data', 'data', 'data']

//Method 2

var newArray = Array.from(Array(10), () => 0 );
console.log(filledArray)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
```

**7.Empty an array**

```javascript
food =['banana', 'mango', 'apple', 'tomato', 'potato', 'onion']

//Method 1
food.length=0

//Method 2
food = [];

//Method 3

while (food.length) { food.pop(); }

console.log(food)
[]
```

**8.Get random value**

```javascript
var items = [25, 45, 21, 65, 43];
v=items[Math.floor(Math.random()*items.length)];
console.log(v)
```
**9.Convert array to an object**

```javascript
var arr = ["One", "Two", 3];
var obj = {...arr};
console.log(obj);
{0: 'One', 1: 'Two', 2: 3}

//second way

Object.assign({}, ['a','b','c']);
console.log(obj);
{0: 'a', 1: 'b', 2: 'c'}
```
Add Anaconda Prompt to Windows Terminal - Solution for Space in Executable Path Issue 
Tags: terminal, anaconda, productivity
Published: 2022-01-23 15:04:44

Windows Terminal is one of the very few things likable about Windows when it comes to developers. It is customize-able and fun.

By default Anaconda Prompt is not one of the available terminal profiles in Windows Terminal. So if you have installed Python through Anaconda, it can be very tedious to switch between terminal applications to issue Python commands. However it is completely possible to set up Anaconda prompt as part of the Windows Terminal, which allows to open Anaconda Terminal as new tab in the Terminal application.

This article assumes that [Windows terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab) and [Anaconda](https://www.anaconda.com/products/individual) are already installed.

## Add Anaconda prompt to Windows Terminal

1. Open Windows Terminal 
2. Press `Ctrl+,`. This will open _Settings_ Tab.
3. Open JSON file.
   ![Settings Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0hg6yiqtpg2ofdnx7s6.png)

4. Copy the `cmd` setting (look for "name" : "Command Prompt") and paste it just above (or where you want) the existing code block.
![Command Prompt JSON Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vex7ojkoqsopjivxwazk.png)

5. Next change the following in the copied block. Remember it is in the _key_: _value_ format:
  - `guid` : Change it anything unique. Ex: change the last 5 letters/digits
  - `name`: Name it to `Ananconda Prompt`
  - `commandline`: This is the path that should point to the Anaconda bat file. Generally this is located at following location: `"C:\\Users\\XXXX\\anaconda3\\Scripts\\activate.bat\"`. Replace `XXXX` with your User Name.
  - In case you cannot find the Anconda .bat file in the above specified location; search for _Anaconda_ in Windows Search Bar.
  - Right click and Open File location
  - On the Anaconda Prompt shortcut, right click and select _properties_.
  - Next copy the .bat part of the path specified in the `Target` dialogue box.
  - Next replace the value of `commandline`: "cmd.exe /K C:\\Users\\XXXX\\anaconda3\\Scripts\\activate.bat\"
![Anaconda JSON Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bhxf6ewohhmqi7en1g2i.png) 

6. Save the `Settings.JSON`.
7. Go to the Windows Terminal and point to the down arrow there should now be an option for "Anaconda Prompt".
![Anaconda Prompt option](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0eeaqk0mwjzy81jp2du.png)

8. **Problematic Part**: In case you have a space in the anaconda activate.bat, then you will get **Syntax error** thrown after saving the Settings.JSON file. Generally this happens when people have spaces in their user name. In that case modify the `commandline` value as "cmd.exe /K **\"**C:\\Users\\User Name with Space\\anaconda3\\Scripts\\activate.bat **\"**"

![celebration GIF](https://media.giphy.com/media/lMameLIF8voLu8HxWV/giphy.gif)
Build Your Business with Best Digital Marketing Company the USA
Tags: digitalmarketing, app, appdevelopment
Published: 2022-01-23 14:54:39


[With the experience of 7 years and based in Tennesse USA, Allied Technologies is more than just a digital marketing agency. It is being known to have secured its place in the list of best digital marketing agencies in the USA and is considered one of the most popular app development companies too. With a team of experts in each field, Allied Technologies has numerous services to offer to its clients. ](https://alliedtechnologies.io/about/)
Allied Technologies
Website- https://www.alliedtechnologies.io/
Email - info@alliedtechnologies.io
Add- 205 Powell Pl, Brentwood, TN 37027, United States
Contact no.- (800) 936-0755
Want to learn about git and GitHub in a more fun way?
Tags: git, github, opensource, beginners
Published: 2022-01-23 14:49:20

We often watch numerous videos, tutorials, and sift through loads of documentation to grasp a concept or a programming language.

Did you know you can learn Git and GitHub in a more engaging manner, such as by playing games or visualizing processes? **Yes, that's right - "by playing games"!**

## Fun Resources to Learn Git and GitHub:
---

### 1) Oh My Git!:

This tool allows you to visualize the internal structures of Git repositories in real-time. [**Link**](https://ohmygit.org/)

![Oh My Git!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04a7nkg3909j2e2ek4hw.png)
---

### 2) Learn Git Branching:

Master the concept of Git branching by visualizing, playing, and completing specific tasks. [**Link**](https://learngitbranching.js.org/)

![Learn Git Branching](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e98kprjz06zicjqgor0s.png)
---

### 3) GitHub Skills:

[GitHub](https://github.com/) itself offers a learning track that helps you enhance your skills by completing fun, realistic projects. [**Link**](https://skills.github.com/)

![GitHub Learning Lab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxupykifg0zfjsb4bqvb.png)

### 4) Git Tower:

Git Tower provides a step-by-step guide to learning Git. Along with detailed instructions, it includes graphics to better understand the concepts. [**Link**](https://www.git-tower.com/learn/git/ebook)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/906ygzkgmkpm2tebwf49.png)

For Support and Reaching Out: <a href="https://twitter.com/intent/follow?screen_name=pradumna_saraf" target="blank">Twitter</a>     <a href="https://linkedin.com/in/pradumnasaraf" target="blank">LinkedIn</a>
Using extensions for Bug Bounty and Pentesting 
Tags: bugbounty, pentesting, cybersecurity, beginners
Published: 2022-01-23 14:45:48

So I was wondering if anybody has tried to use the Ext. for Firefox or Chrome for bug bounty's or Pentesting. Some of them look Promising and there are a number of post regarding there use but what do I know I'm a complete beginner @ this.
Bring Your Own IP Address to the Cloud
Tags: aws, vmware, vmwarecloud, cloud
Published: 2022-01-23 14:41:42

**Bring your own IP**
EASILY MIGRATE TO AWS WITH YOUR PUBLIC ipv4 ADDRESSES
Keep your IP address reputation Avoid changes to IP address whitelists Move legacy applications with no need to change IP addresses.

**Migration**
Avoid IP address changes to applications when you migrate to the AWS Cloud.

**Prerequisite**

1. The address range must be registered with your regional internet registry (RIR)
2.  Supported RIRs include the American Registry for internet numbers (ARIN) and RIPE

**Preparing you IP range**
Authorization- Create an ROA to authorize Amazon ASNs 16509 and 14618 to advertise your address range.

ROA- ROA is a cryptographically signed object that states which autonomous system (AS) is authorized to orginate a particular IP address prefix or set of prefixes. ROAs may only be generated for internter nuber resources covered by your resource certificate

To get ROA
ARIN:
https://www.arin.net/resources/rpki/roarequest.html 

RIPE:
https://www.ripe.net/manage-ips-and-asns/resourcemanagement/certification/resource-certification-roamanagement 

**Preparing you IP range**
Authorization- Create an ROA to authorize Amazon ASNs 16509 and 14618 to advertise your address range.

Authentication- Generate an RSA 2048-bit key pair
openssl genrsa -out private.key 2048

Create a signed message.
example
1|aws|account|cidr|YYYYMMDD|SHA256|RSAPSS


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzjsny1ly3put53es2w9.JPG)

The following command signs the message using the key pair you created and save it as base64_urlsafe_signature:

echo "1|aws|123456789012|198.51.100.0/24|20191201|SHA256|RSAPSS" | tr -d "\n" | openssl dgst -sha256 - sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:-1 -sign private.key -keyform PEM | openssl base64 | tr -- '+=/' '-_~' | tr -d "\n" > base64_urlsafe_signature

Update the RDAP record for your RIR with the X509 certificate
Be sure to copy the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- from the certificate. 

To view your certificate, run the following command:
cat publickey.cer

For ARIN, add the certificate in the "public comments" section for your address range.

For RIPE, add the certificate as a new "desc" field for your address range.

More details- ([BYOIP guide](https://pages.awscloud.com/Deep-Dive-on-Bring-Your-Own-IP_1024-NET_OD.html))

**BYOIP Reference Architecture-1**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/osztbmt7x1kf6a06915z.JPG)

**BYOIP Reference Architecture-2**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o753p0zy5ifwexa5rdgp.JPG)

Refer- [Reference Architecture](https://d1.awsstatic.com/architecture-diagrams/ArchitectureDiagrams/VMware_cloud-on-AWS_BYOIP_ra.pdf?did=wp_card&trk=wp_card)
Visual regression testing with Backstop JS
Tags: webdev, backstopjs, testing, react
Published: 2022-01-23 14:37:08

**What is Visual regression testing**

A visual regression test checks what the user will see after any code changes have been executed by comparing screenshots taken before and after code changes.

**Why Backstop JS**

Consider that, we have a web app with 50+ scenarios/screens and it is supported in multiple devices like mobiles, tablet and desktops. Every time, UX change is done, it is time consuming to test all scenarios in all supported devices. 

Backstop JS helps front end developers to automate the visual regression testing. 

- Provides an easy way to compare current change against Reference(old screenshot) 
- Supports multiple viewports
- Multiple scenario based configurations for testing
- Reduce lot of effort in manual testing

Let’s dive into configuring backstop js with basic react app

```
npx create-react-app visual-regression-testing
cd visual-regression-testing
npm start
```
This will open basic react app in http://localhost:3000/

Replace the content in App.js with some heading in h1 tag

```
function App() {
  return (
    <div className="App">
      <div className="login-form">
       <h1>Backstop visual regression testing...</h1>
       <p>By Madasamy Ponraj</p>
      </div>
    </div>
  );
}
```
In root folder, install backstop js using below command.

> npm i backstopjs

Execute below command to generate backstop configuration files.

> backstop init

Open backstop.json and change the url under scenarios to http://localhost:3000/

Run backstop test to generate initial reference files. 

> backstop test

You will be seeing Unexpected error image inside backstop_data/bitmaps_reference folder. This is happening as our app is not running. We will resolve this using start-server-test dependency.

> npm i --save-dev start-server-and-test

Add below scripts to package.json scripts section

`"healthcheck": "npm run backstop:test",
    "visual-test": "backstop test",
    "backstop:approve": "backstop approve",
    "backstop:test": "start-server-and-test start http://localhost:3000 visual-test"`

Run below command. Two tabs will be opened one with preview and another one with reference screenshots. 

> npm run backstop:test

To approve these initial reference screenshot.

> npm run backstop:approve

If you execute **npm run backstop:test** once again, you can see that command executed with out any failures, as references are approved. Lets add one more p tag below our h1 tag inside our App.js file to see visual comparison.

`<p>By Madasamy Ponraj</p>`

Run **npm run backstop:test** now. You can see the report generated like below. If the changes are expected, we can approve it or we can investigate the issues.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8v9yxq1hck49g6dql3g2.png)

If you want to add backstop testing as part of health check along with unit tests and lint, we can use healthcheck script.

Please download the codebase from here [visual-regression-testing](https://github.com/madasamybe/visual-regression-testing), if you want to try.