teleren/devto huggingface dataset:
MacOS Pratik Kalıcı Ortam Değişkeni Ekleme/Değiştirme Yöntemi
Tags: mac, macos, linux, unix
Published: 2020-03-30 09:48:08

---
title: MacOS Pratik Kalıcı Ortam Değişkeni Ekleme/Değiştirme Yöntemi
published: true
date: 2020-03-29 16:28:21 UTC
tags: mac,macos,linux,unix
canonical_url: https://medium.com/@brehpoint/macos-pratik-kal%C4%B1c%C4%B1-ortam-de%C4%9Fi%C5%9Fkeni-ekleme-de%C4%9Fi%C5%9Ftirme-y%C3%B6ntemi-ade2b4bc937d
---

MacOS üzerinde ortam değişkenlerini hızlı bir şekilde kullandığını bash’inize yansıtabileceğiniz **kısa** ve **basit** bir yöntemden bahsetmek istiyorum.

home dizininize yada istediğiniz farklı bir dizine giderek .env isimli bir dosya açıyoruz.

> cd ~/  
> nano .env

![](https://cdn-images-1.medium.com/max/640/1*F1Vxk-Plvth3qrc0xLS8OA.jpeg)

Comment olarak **#** karakteri ya da kendi belirlediğiniz farklı bir karakteri kullanabilirsiniz.  
**KEY=VALUE** şeklinde değişkenlerinizi tanımlıyoruz.

![](https://cdn-images-1.medium.com/max/640/1*22uvRrUUE5cA7FfYyN-jxA.jpeg)

Buradan sonra bu dosyayı okuyarak aktif bash imize export edecek bir komut çalıştırmamız gerekiyor. (# karakteri ile kendi belirlediğiniz karakteri değiştiriniz)

> export $(egrep -v ‘^#’ ~/.env | xargs -0)

Aktif olarak bir terminal açtığınızda çalışaçak bu satırı kendi bash’iniz ayarlarına eklemeniz gerekiyor.   
“~/.bashrc” , “~/.zshrc” etc…

![](https://cdn-images-1.medium.com/max/640/1*0zrpCNvf8wG51hVCyDfdEQ.jpeg)

![](https://cdn-images-1.medium.com/max/639/1*rMjJPZJBguABanrdphCUVw.jpeg)

Yeni bir terminal ekranı çalıştırıyor ve **printenv** komutunu veriyoruz.  
Aşağıda gördüğünüz üzere  **.env** dosyasında bulunan

> USERNAME=berkayakcay

değişkeninin tanımlanmış olduğunu görüyoruz.

![](https://cdn-images-1.medium.com/max/639/1*-22ituEqtDo6vqD9ytjeLg.jpeg)

![](https://cdn-images-1.medium.com/max/640/1*M28zqEzNdpEiQO_horHs1w.jpeg)
Introducing the Brave Goals Vlog How to Bring Your Tech Ideas to Life
Tags: tutorial, startup, techtalks, motivation
Published: 2020-03-29 16:27:32

---
title: Introducing the Brave Goals Vlog How to Bring Your Tech Ideas to Life
series: Brave Goals Vlog - Startup Goals
published: true
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ovdkt4ywvtifarv5iewl.png
description:
tags: tutorial, startup, techtalks, motivation
---
Everyone, developers and non-technical people alike, has had an idea to create some sort of tech product. Wouldn't it be cool to actually turn your app idea into a real life product? This series is focused on helping you take your idea from concept to an actual product and potential business. 

<a href="https://www.youtube.com/watch?v=cuR1EpJjyBk" target="_blank">This video</a> will introduce you to the first 5 phases of transforming your idea from just a concept to a real life digital product.

Even if you're not a technical person, you can bring your tech ideas to life.

<b>Tools referenced in this video</b>
[Evernote](https://evernote.com/)
[SublimeText - a simple but powerful text editor](https://www.sublimetext.com/)
[Headspace] (https://www.headspace.com/)
[Venmo](https://venmo.com/)

<b>Technical feasibility resources</b>
[Toptal](www.toptal.com)
[Upwork](www.upwork.com)
[CoFounders Lab](https://cofounderslab.com/)

I'm Charles, a Product Engineer, and my motivation with this series is to help you along this journey and share what I've learned from 13 years of working as part of teams of talented engineers and designers breathing digital life into what was initial just an idea. 

Also, this is a fun way for me to structure my side-projects in a way that makes each development phase it's own enjoyable mini-project - creating an informative vlog.
When you are a Junior Developer 
Tags: juniordev, discuss, productivity, devlive
Published: 2020-03-29 16:27:04

Its my first try for writing a blog and documenting my journey . So , it's been six months after I came out as freshly grad having a degree in CS and entered into this world of development .

It's been wonderful journey so far and following are some things/tips which i learned along the way :-

##**Learn**
As a fresher , you have to understand that there many things which you might not have learned in college , but you get to know them now . It maybe some coding conventions , the logic part or some coding terminology . 
I would suggest you  to learn those things , because these things are going to help you in long run. Learn from senior developers around you , see how they write a logic for a particular problem , see from there perspective rather than yours . Learn how they debug a problem ,see what shortcuts they are using which might be helpful.

##**Ask Questions** 
If you get stuck somewhere while doing the development or the assigned task , ask for other devs near you for help .Don't be shy . You are fresher, so they don't expect that you know everything . The dev community which I have noticed are always willing to help . So ask , don't hesitate

##**Don't Be Narrow Minded , Open Mind is all you want** 
Many people or to be specific junior devs mostly get stuck with one logic that they think is simple to implement. Rather thinking for simple logic, think how efficient your logic will be in long run. Be open for alternatives . Have an open mind 

##**Dont Panic if don't understand the flow** 
Sometimes the projects are big , so to understand the overall flow it takes time. Don't panic and think you don't know anything . Give yourself some time , things will start falling into the place.

##**Value your time as well as Value others time**
Lastly value your time . When you go to ask for help , be specific with your questions Because the person your asking might have a busy schedule , still that person is finding some time to help you, Appreciate that .

I think that's enough from my side . If you have any more points to add from your side , feel free to do so . 

Always welcome for suggestions and feedback .

##**Happy Coding !** 👨‍💻
Qiitaの記事とストックをバックアップする
Tags: qiita, powershell
Published: 2020-03-29 16:27:00

---
title: Qiitaの記事とストックをバックアップする
published: true
tags: Qiita, PowerShell
date: 20200329T16:27Z
canonical_url: https://qiita.com/shiena/items/bec74e0f0c0e46644d64
---
# はじめに

最近PowerShellを使っているので力試しにQiitaの記事とストックをバックアップするスクリプトを作りました。
LGTM一覧は残念ながらQiita APIにないのでWebページをスクレイピングしないと取得できなさそうです。

# 動作環境

* Windows PowerShell 5
* PowerShell Core 6
* PowerShell 7

# 使い方

## 記事のバックアップ

[qiita-item-exporter.ps1](https://gist.github.com/shiena/ccbb5f2a382cc16b616b5848594539c1#file-qiita-item-exporter-ps1)

1. ファイルの先頭に`$userId`を自分のアカウント名に変更します。
1. 記事中の画像ファイルのURLはデフォルトでファイル名のみに置換しますが他のURLに置き換えたい場合に設定します。  
  たとえば`$imageFolder = "https://example.com/images/"`にすると記事中の画像のURLが以下のように置換されます。
  * 変更前 `https://qiita-image-store.s3.amazonaws.com/0/00000/ffffffff-ffff-ffff-ffff-ffffffffffff.png`
  * 変更後 `https://example.com/images/ffffffff-ffff-ffff-ffff-ffffffffffff.png`

```powershell:qiita-item-exporter.ps1
$userId = 'your-user-name'
$imageFolder = "" # replace image path
```

`qiita-item-exporter.ps1`を実行すると以下のような構造で記事と画像が保存されます。

```
- items
  +- readme.md                                   # 各記事へのリンク
  +- xxxxxxxxxxxxxxxxxxxx                        # 記事のID
     +- xxxxxxxxxxxxxxxxxxxx.md                  # ダウンロードした記事
	 +- readme.md                                # 画像のURLを置換した記事
	 +- ffffffff-ffff-ffff-ffff-ffffffffffff.png # 記事中の画像
	 +- meta.json                                # 作成日時、更新日時、タイトル、タグを保存したJSON
```

## ストックのバックアップ

[qiita-stock-exporter.ps1](https://gist.github.com/shiena/ccbb5f2a382cc16b616b5848594539c1#file-qiita-stock-exporter-ps1)

1. `$userId`と`$imageFolder`は`qiita-item-exporter.ps1`と同様の設定です。
1. ストックの総数はQiita APIで取得できないので[ストック一覧](https://qiita.com/stock)の一番下からページ数を確認して`$pages`を設定します。  
  このスクショでは`29`がページ数です。
  ![image.png](https://dev-to-uploads.s3.amazonaws.com/i/zapqwr7uwfli71fzed6j.png)

```powershell:qiita-stock-exporter.ps1
$userId = 'your-user-name'
$pages = 1 # your-stock-pages
$imageFolder = "" # replace image path
```

`qiita-stock-exporter.ps1`を実行すると以下のような構造で記事と画像が保存されます。

```
- stokcs
  +- readme.md                                   # 各記事へのリンク
  +- xxxxxxxxxxxxxxxxxxxx                        # 記事のID
     +- xxxxxxxxxxxxxxxxxxxx.md                  # ダウンロードした記事
	 +- readme.md                                # 画像のURLを置換した記事
	 +- ffffffff-ffff-ffff-ffff-ffffffffffff.png # 記事中の画像
	 +- meta.json                                # ユーザーID、ユーザー情報、タイトル、タグを保存したJSON
```

# さいごに

PowerShellは文法こそ独特なもののC#のLINQのようにパイプで文字列だけではなくオブジェクトを流せるのでデータの加工が楽でした。
Ionic Build Information Virus Covid-19
Published: 2020-03-29 15:51:52

Hello Everyone
Trying to become a mobile developer to make information application co-19 virus spread with api data https://covid19.mathdro.id/api/ was built with ionic fw #angular #ionic #crossplatform

<a href="https://imgflip.com/embed/3ui0mr"><img src="https://i.imgflip.com/3ui0pa.gif" title="made at imgflip.com"/></a>

Link netlify
https://ion-covid.netlify.app
Link Github
https://github.com/bahyusanciko/ion-covid-19
Solidify your JavaScript Knowledge with "Just JavaScript"
Tags: beginners, webdev, javascript, tutorial
Published: 2020-03-29 15:44:21

Hey peers!:)

A while ago I scrolled through [Dan Abramov's Blog](https://overreacted.io/) and found something very valuable: 

[**Just JavaScript**](https://justjavascript.com/)

Just JavaScript is Dan Abramov's newest project for people who like to learn more about the underlying principles of JavaScript to solidify their mental models of how it works and how things are implemented.

It's structured in lots of small lessons, that get e-mailed to you bit after bit, consisting of detailed explanations followed by exercises to solidify the newly gathered knowledge

I'm just through lesson #04, but I'm already in love with Dan's fantastic style of explaining things through physical alliterations and fantastic illustrations like this:

![An explanation of values and expressions relative to your code](https://dev-to-uploads.s3.amazonaws.com/i/qnfmecz5ziitfvwj9co7.jpg)

I cannot recommend this course enough. So, if you (like me) are struggling sometimes when it comes to the principles of JS or you're just curious why `0.1 + 0.2 === 0.3` is `false` in JavaScript, just [sign up for it](https://justjavascript.com)!
Is declaring helper variables which are simply removal of `this` bad practice?
Tags: discuss, javascript, codequality
Published: 2020-03-29 15:44:12

Hi there, I'm newbie for dev.to and this is my first post.

Our company has a convention to declare helper variables which are simply removal of `this` like the following.

```javascript
export class SampleClass {
  constructor() {
    // this is a constructor
  }

  get sampleGetter() {
    // return something
  }

  sampleMethod() {
    // What do you think about the following?
    const sampleGetter = this.sampleGetter;

    // do something
  }
}
```

I was thinking that it's efficient when the variables are used multiple times.
However, I've been recently pointed out that it's premature optimaization and just adds a tiny bit of complexity with no clarity.

What do you think? I'd like to hear your opnions.
What’s your alternative solution? Challenge #4
Tags: challenges, discuss, javascript, codenewbie
Published: 2020-03-29 14:49:48

# About this series

This is series of daily JavaScript coding challenges... for both beginners and advanced users.

Each day I’m gone present you a very simple coding challenge, together with the solution. The solution is intentionally written in a didactic way using classic JavaScript syntax in order to be accessible to coders of all levels.

Solutions are designed with increase level of complexity.

## Today’s coding challenge

```
Print all the multiplication tables with numbers from 1 to 10.

```

(scroll down for solution)

## Code newbies

If you are a code newbie, try to work on the solution on your own. After you finish it, or if you need help, please consult the provided solution.

## Advanced developers

Please provide alternative solutions in the comments below. 

You can solve it using functional concepts or solve it using a different algorithm... or just solve it using the latest ES innovations.

By providing a new solution you can show code newbies different ways to solve the same problem.

## Solution

```javascript
// Solution for challenge04

for(var i = 1; i <= 10; i++)
{
    printTable(i);
    println("");
}

function printTable(n)
{
    for(var i = 1; i <= 10; i++)
    {
        var row = n + " * " + i + " = " + n * i;
        println(row);
    }
}

```


To quickly verify this solution, copy the code above in this coding [editor](https://codeguppy.com/code.html) and press "Run".

> Note: The solution was originally designed for [codeguppy.com](https://codeguppy.com) environment, and therefore is making use of `println`. This is the almost equivalent of `console.log` in other environments. Please feel free to use your preferred coding playground / environment when implementing your solution.
How i earned $450 in first month of freelance game development
Published: 2020-03-29 14:37:02

Hello dear game developers, In today's post i will share how i got real customers and started a profitable business as an instant game developer. Hope you like it and also give it a try to earn some real cash from online.

I have been learning and making games for Facebook instant game platform from last 6 months. In February i saw people around me working on fiverr. I wanted to give it a try. Why don't i start with what i am doing right now. So i created a gig on Facebook instant game development and within 1 month i achieved $450 and a 1 star review and still getting works from buyers.

Firstly i learned 2d game development by accident. I started work for a local company but they didn't pay me for my work. Then i started to work for another company and they pay me well. I work on unity there but sometimes they need javascript to publish game for clients.

How to get started? Go to fiverr open your account. Create a gig of what you are good at or at least confident you can you do it. Do some seo first. And wait for few days. And this will bring you your first customer.

What to do if you get your first buyer? Try to complete your first project as soon as possible with given requirements. Keep good relationship with buyer. Because he/she may have similar works for you. And be honest with your buyer. If you face any problem don't hesitate to ask. Keep updating him/her everyday. If buyer asks for a revision try to solve issues as he/she says. And that's it. If you can fulfill this criteria's your buyer will return to you.

You can visit my fiverr gig from here: https://www.fiverr.com/share/jjQKKV

In next few posts i will share how i develop games using javascript/typescript.

Stay at home. Wash your hands. Don't touch your face without washing hands. Be safe and keep safe.

Thank you for reading. Keep following for more updates on outsourcing.
Your friend and neighbour WiFi
Tags: security, wifi
Published: 2020-03-29 14:32:39

---
title: Your friend and neighbour WiFi
published: true
description: don't trust open WiFis, they could be a trap!
tags: security, WiFi
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4ss2jhso1bkxean4vpw1.jpg
---

Recently I've been reading about ways to help your neighbourhood with the COVID-19 crisis, here in Spain. But one of the tips they gave was quite unsecure, because it's based in the fact that everyone is nice: "Share your WiFi!" well, it is a wonderful idea to share your Internet connection if you know how to protect it and have different channels for you and your guests. On the other hand trusting on unknown open WiFis is also a bad idea. I want to show today why, using a Wifi pineapple.

The [original WiFi pineapple](https://shop.hak5.org/products/wifi-pineapple) is a redteam gadget designed by Hak5, an offensive security exclusively brand. There are also Raspberry PI versions, but I'll use the original one. I'm using a pocket size version.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4ss2jhso1bkxean4vpw1.jpg)

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

This gadget simulates a router and captures traffic of the ones who connect to it. It aims to assist professionals in MITM (man in the middle) attacks, which consist on steal data of a connection or impersonate someone. 

![](https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse2.mm.bing.net%2Fth%3Fid%3DOIP.ekx1FKEYvwzreZQOcV1BMgHaES%26pid%3DApi&f=1)

This gadget is a lot of fun I must confess. You can access to the information launching a local web interface, seeing the networks around you, the devices and all. So when you are an user, what you see is an open connection sometimes using a familiar name such as "Starbucks" or something similar, and you can use the Internet (as the __Pineaaple__ is connected to a legit source of Internet connection) so you might not notice you are being watched! Side note, if you try this in a security conference, you might get pranked when trying to do this attack as you might encounter WiFi connections around you named "__idiot__" or "__gotcha__". 

In any case be careful out there, and even though an open WiFi is a huge temptation, don't be gullible. And if, even though, you want to share your WiFi, create a Guest's WiFi and share a password for it with neighbours.
Introduction to property-based testing
Tags: testing, functional, propertybased
Published: 2020-03-29 13:40:18

---
title: Introduction to property-based testing
published: true
description: Verify assumptions about your code
tags: testing, functional, property-based
---

Property-based testing is a testing paradigm supporting regular example-based unit tests. In the [Pragmatic Programmer](https://en.wikipedia.org/wiki/The_Pragmatic_Programmer) book, the authors recommend to use property-based testing for verifying assumptions about their code. It forces you to think about the actual preconditions, postconditions and invariants of your code instead of implicitly coming up with such rules through hard-coded examples.

I recently gave a presentation at work about property-based testing. You can find the slides at [ksaaskil.github.io/introduction-to-property-based-testing/](https://ksaaskil.github.io/introduction-to-property-based-testing/) and the accompanying code in [github.com/ksaaskil/introduction-to-property-based-testing](https://github.com/ksaaskil/introduction-to-property-based-testing). The presentation also contains some material about testing stateful systems, an intriguing but complex topic.

Most of the contents in the presentation come from the [Property-Based Testing with PropEr, Erlang, and Elixir](https://propertesting.com/) book. It's an awesome book and I highly recommend it! Don't be put off if you don't know Erlang or Elixir: the code samples are very readable (well at least the Elixir ones are) and you may learn a beautiful new language. I know I love Elixir now!

Thanks for reading, as always I appreciate any feedback.
🌠 Listing My GitHub Stars
Tags: showdev, github, python, tools
Published: 2020-03-29 14:01:41

---
title: 🌠 Listing My GitHub Stars
published: true
tags: showdev, github, python, tools
series: Creating a GitHub Repository Showcase
description: Presenting a Python tool to create a repository that lists all your starred GitHub repositories by topic.
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/b6q90n7xcz1va37f9hxr.png
---
> *[starred](https://github.com/maguowei/starred) is a Python tool to create a repository that lists all your GitHub stars by topic.*

Having a list of your stars organized by topic helps you as well as others to explore that database of curated know-how from another angle than what GitHub's web interface provides. On the “Stars” tab of your profile page, you can filter by language / technology or a keyword, and sort the list by history, popularity, or activity.

The [starred](https://github.com/maguowei/starred) CLI tool gets all your stars via the GitHub API and writes them to a README file that is then committed into a dedicated repository in your account.

The [end result](https://github.com/jhermann/observatory/blob/master/README-AtoO.md#readme) looks like this:

> ![Sample ‘Starred’ Listing](https://dev-to-uploads.s3.amazonaws.com/i/esiq5txxstdejkw7c0y6.png)

This also makes it easy to search for repositories and their descriptions, by using the in-page search of your bowser (`Ctrl-F`).

While we're on the topic of searching for keywords in your stars, the [oh-my-stars](https://github.com/wolfg1969/oh-my-stars) tool does just that.

![oh-my-stars](https://dev-to-uploads.s3.amazonaws.com/i/mseeq8d60sxmv1t5t2zi.png)

But that has to wait for another post…

> *Image credits:* [John Vermette](http://www.johnsastrophotos.com/uploads/2/8/4/9/28492009/cometlovejoy2.jpg)
Uniqueness Gotcha!!!
Published: 2020-03-29 13:56:41

Link: https://blog.joshsoftware.com/2015/05/04/uniqueness-gotcha/

Consider the following relation where poll is having many options and each option of the poll must be having a unique description,

Now, when trying to create a poll with its options using nested attributes, uniqueness validation is not getting applied due to race condition.
Kafka Connect JDBC Sink: tips & tricks - video walkthrough
Tags: apachekafka, database, tutorial, postgres
Published: 2020-03-29 13:56:14

Using ksqlDB you can enrich streams of data, and write the resulting Kafka topic to a database. You can also build stateful aggregations and write these to a database. 

🎥 https://rmoff.dev/ksqldb-jdbc-sink-video

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

Check out [this tutorial](https://rmoff.dev/ksqldb-jdbc-sink-video) for a walkthrough of how to do this and learn tricks such as: 

* Troubleshooting Kafka Connect JDBC sink
* Un-nesting data for loading into the database (solves the error "(STRUCT) type doesn't have a mapping to the SQL database column type") 
* Handling timestamp fields
* Idempotent database updates
* Update rows in place based on a declared key

Whilst the tutorial is built around ksqlDB, the tips & tricks for the JDBC sink apply equally to Kafka Connect used on its own. 

You can find the Docker Compose and notes on how to try this out for yourself here: https://rmoff.dev/ksqldb-jdbc-sink