teleren/devto huggingface dataset:
RedHat 8 Docker imajı
Tags: redhat, docker
Published: 2020-09-27 20:14:16


Kurumsal ortamdaki Redhat kullanıcıları genellikle Centos üzerinde denemeler yapabilmekte olup paket depoları birbirine çok benzemektedir. Fakat yine de Redhat'e bağımlı veya onunla ilişkili bazı paketlerde problem yaşanmaktadır.

Docker imajı olarak centos imajı Ubuntu imajı kadar çok kullanılmaktadır. Fakat redhat imajları malesef ki Docker ile çok fazla kullanılmamaktadır. Bu konuda Redhat ekibi, Universal Base Images(UBI) adında, docker deposu içerisinde bir imaj dizisi oluşturdu. Bu konuda 7 ve 8 sürümleri için ubi-init, ubi ve ubi-minimal isimli 3 farklı imaj bulunmakta. Bu imajlara [adresinden](https://registry.redhat.io/) ulaşabilirsiniz.

Docker üzerinde bu imajları çağırmak ise oldukça kolay. Örneğin bu imajlarla beraber bir bash kabuğu açmak isterseniz aşağıdaki komutu uygulayabilirsiniz:

```bash
docker run -it --name test registry.access.redhat.com/ubi8/ubi:8.1 bash
```

Bu imajla oluşturduğunuz konteynıra girdiğinizde **yum repolist** komutu çıktısı olarak ubi-8-appstream, ubi-8-baseos ve ubi-8-codeready-builder isimli depoları görmektesiniz. Bunlara ek olarak ubi-8-appstream	deposu da eklenebilmektedir.

Ve örnek bir nginx sunucusu kurulumu ile ilgili aşağıdaki dockerfile'ı inceleyerek kullanım konusunda daha verimli bir içerik sağlayabilriiz.

```
FROM registry.access.redhat.com/ubi8/ubi:8.1

RUN yum --disableplugin=subscription-manager -y module enable php:7.3 \
  && yum --disableplugin=subscription-manager -y install httpd php \
  && yum --disableplugin=subscription-manager clean all

ADD index.php /var/www/html

RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
  && sed -i 's/listen.acl_users = apache,nginx/listen.acl_users =/' /etc/php-fpm.d/www.conf \
  && mkdir /run/php-fpm \
  && chgrp -R 0 /var/log/httpd /var/run/httpd /run/php-fpm \
  && chmod -R g=u /var/log/httpd /var/run/httpd /run/php-fpm

EXPOSE 8080
USER 1001
CMD php-fpm & httpd -D FOREGROUND
```

Yazı için kullandığım kaynak: https://developers.redhat.com/blog/2020/03/24/red-hat-universal-base-images-for-docker-users/
Python // import ?
Published: 2020-09-27 20:09:04



what is import ?

//Import in python is similar to #include header_file in C/C++. Python modules can get access to code from another module by importing the file/function using import. The import statement is the most common way of invoking the import machinery, but it is not the only way.

import module_name
When import is used, it searches for the module initially in the local scope by calling __import__() function. The value returned by the function are then reflected in the output of the initial code.
World of WoqlCraft - Ep.25 Exploring the Dbpedia and Seshat dataset
Tags: database, jupyter, python, visualisation
Published: 2020-09-27 20:05:34

---
title: World of WoqlCraft - Ep.25 Exploring the Dbpedia and Seshat dataset
published: true
description: Today we will explore the DBpedia and Seshat dataset using our new graph visualisation tool in Jupyter notebook. Not only generating a cool interactive graph in the Jupyter notebook, but we can also export it as an HTML file.
tags: database, Jupyter, python, visualisation
---
Today we will explore the DBpedia and Seshat dataset using our new graph visualisation tool in Jupyter notebook. Not only generating a cool interactive graph in the Jupyter notebook, but we can also export it as an HTML file.

Find the source code from our [tutorial repo](https://github.com/terminusdb/terminus-tutorials).

Join the TerminusDB community at [Discord](https://discord.gg/Gvdqw97)
ShadowGas - v1.1.0
Tags: blockchain
Published: 2020-09-27 20:03:13

ShadowGas now supports GST2 Tokens in the new update. Now it can store and transfer CHI, LGT, and GST2 gas tokens. 

---

#v1.1.0

1. Removed unused contracts
2. Reduced the size of the ShadowGas contract from 7.50KB to 6.39KB
3. Added GST2 Scripts and Tasks (Tank, Refuel, Empty, EmptyTo)
4. Updated Contract, added `gstDiscount modifier`, `_destroy function`, `gst store and transfer functions`
5. Changed test directory (can test each token separately)
6. Added GST2 tests
7. Added GST2 configuration to `shadow.config.json`

---

## shadow.config.json

```sh
`RefuelChiAmt` - Mint Chi Amount
`RefuelLgtAmt` - Mint Lgt Amount
`RefuelGstAmt` - Mint Gst Amount
`EmptyChiAmt` - Transfer Chi Amount
`EmptyLgtAmt` - Transfer Lgt Amount
`EmptyGstAmt` - Transfer Gst Amount
`EmptyChiTo` - Address to transfer Chi to
`EmptyLgtTo` - Address to transfer Lgt to
`EmptyGstTo` - Address to transfer Gst to
`GasLimit` - Gas Limit
`GasSpeed` - Gas Speed ("fast", "average", "slow") 
`TradeLimit` - The amount of trades to perform
`LgtTradeAmount` - Amount of LGT Tokens to trade
```

## GST2 Kovan & Mainnet

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

Be sure to use the correct address for GST2!

*Default is Kovan*

## GST2 Examples

```sh
npx buidler tank --token Gst
```

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

```sh
npx buidler refuel --token Gst
```

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

```sh
npx buidler empty --token Gst
```

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

```sh
npx buidler emptyTo --token Gst
```

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

## Tests

```sh
npx buidler test
```

Run all tests

```sh
npx buidler test ./test/gst-test.js
```

Test GST2 Tokens

```sh
npx buidler test ./test/chi-test.js
```

Test Chi Tokens

```sh
npx buidler test ./test/lgt-test.js
```

Test Lgt Tokens

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

*All tests should pass, but they do require ether to run*

---

I am now working on *v2.0.0*, this version will include the UI in order to interact with the contract through the DApp.
A brief introduction to Observability Driven-Development
Tags: introduction, odd, devops, computerscience
Published: 2020-09-27 19:34:04

Hi Everyone!

Let's talk about the Observability Driven-Development and how it works.

### Why software development needs a "methodologies driven development"?

First of all, I took advantage of this instance to share answers from another user to discuss with a short explanation of why software development "Driven-development" or "Driven-design" are needed.

> *how come we don't have -Driven Development in other engineering disciplines, only in software? It's because other branches of engineering are faced with much lower levels of uncertainty. When engineering physical objects/systems. it is much cleared what are we building and what are the actual physical constraints (for example, when building a bridge).* [discuss source here](https://dev.to/fransafu/comment/158ai)

Ok, you just keep in mind that **"the software development process has uncertainty"** because we have the human factor in a transversal way throughout the process.

## Observability Driven-Development

Now, Observability Driven-Development applies when you monitor your process before, during, and after the development process. The goal is to detect user experience issues or bugs that have not yet been reported. So at best, you can run into problems through observability.

### What the mean "Observability"?

The concept of "Observability" doesn't have its origin in computer science and is applied to software engineering, it originated in systems theory issues where it was about "understanding a system through observation". So, this methodology aims to understand and improve a system by observing at startup or when it is mainly operational (production). The reason for observing a system in those processes is because when a system is running it is exposed to other unexpected actions by users.

### What about it with other Driven development methodologies?

The authors say that the methodology doesn't conflict with other methodologies such as TDD or BDD. Then, it is a complementary methodology in which DevOps, SRE, QA, Developers, and Product Owner participate where a monitoring system is used to understand where they can debug to find a problem or where they can improve a system.

## Conclusions

**ODD doesn't say where the problems are, but it's useful to find them by observation.**

Thanks for reading :)

I hope helpful this brief introduction.

More info about it in [infoq.com](https://www.infoq.com/articles/observability-driven-development/)
Some Linux Bash Stuff
Tags: linux, bash
Published: 2020-09-27 19:06:09

Bash stands for Bourne again shell. Bash is an interpreted language meaning it does not have to be compiled to convert the code to machine language. This is done by the shell reading the input commands and then finding the corresponding machine commands to replace each line of code. 
In this blog series, I want to cover a few of the operations of Bash. Starting with writing, reading, variables, and loops in this article.

##Writing
When writing to the terminal you must use the echo command followed by what you want to be written out to the screen encased in double-quotes. An example is shown below
```
echo "This is Bash"

This is Bash
```

The output strings can be customized by adding variables that can be determined at runtime. This is shown in the next section

##Reading and variables
To read a variable into your bash program simply type read followed by the variable name. Then to access the variable's value put a $ before its name. 

```
read name
echo "Hello $name!"

Hello (value in name)!
```
In bash, there are only four variable types available to use. These include:
* Integer variables
* Strings variables
* Constant variables
* Array variables

Declaring and instantiating an integer uses the same process as strings. As for the others, I will cover constants and arrays in a later post.

##Loops
The main loop used in bash is a for loop. However, there are a lot of different variations on how to implement this. I will cover the basic structure, and if you want to see more versions look at these [docs](https://www.cyberciti.biz/faq/bash-for-loop/).

The basic method is to use a range as shown below:
```
for i in {1..99..2}
do 
  echo $i
done
```
The numbers in brackets tell the script to loop from 1 to 99 by twos and output the current number. The range can be replaced by any number of multiple items, arrays, integers, or strings.
Figure & Figcaption: Supporting IE11, JAWS, NVDA, & VO
Tags: a11y, screenreader, html, figure
Published: 2020-09-27 18:57:56

---
title: Figure & Figcaption: Supporting IE11, JAWS, NVDA, & VO
published: true
description: I need to use role & aria-labelledby with figure elements in order for all screen readers across all browsers to recognize the figure and figcaption correctly.
tags: a11y, screenreader, html, figure
//cover_image: https://direct_url_to_image.jpg
---

_Originally posted on https://dear-dia11y.com/figure-and-figcaption-supporting-ie11-jaws-nvda-and-vo.html_

Dear dia11y,

At work, I must support IE11 along with all the other major browsers, so that means I need to support [JAWS](https://www.freedomscientific.com/products/software/jaws/) & [NVDA](https://www.nvaccess.org/download/) across these browsers on Windows in addition to VoiceOver on macOS & iOS Safari (I don't do much in the Android world at the moment).

About 1-2 months ago, I did a lot of work fixing up issues around `<figure>`s and `<figcaption>`s. For a refresher, here's [the example that MDN uses](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption):

```html
<figure>
  <img
    alt="Elephant at sunset"
    src="/media/cc0-images/elephant-660-480.jpg"
  />
  <figcaption>
    An elephant at sunset
  </figcaption>
</figure>
```

This is straightforward, but JAWS + IE11 didn't quite recognize this as a figure, and we had issues with the caption because we had a `<div>` as the parent of the `<figcaption>`. NVDA + Firefox didn't like this setup, either.  Here's what our example was structured like:

```html
<figure>
  <img
    alt="Elephant at sunset"
    src="/media/cc0-images/elephant-660-480.jpg"
  />
  <div>
    <figcaption>
      An elephant at sunset
    </figcaption>
  </div>
</figure>
```

After going back and forth with different combinations of elements and attributes, here's what was settled on to make this work across all these browsers and screen readers:

```html
<figure aria-labelledby="caption-id" role="figure">
  <img
    alt="Elephant at sunset"
    src="/media/cc0-images/elephant-660-480.jpg"
  />
  <figcaption id="caption-id">
    An elephant at sunset
  </figcaption>
</figure>
```

Adding `role="figure"` to the `<figure>`, explicitly stating that it was labelled by the `<figcaption>`, and placing `<figcaption>` as an immediate child of `<figure>` resolved all our issues.

This was a helpful table of related compatibility: https://www.powermapper.com/tests/screen-readers/labelling/img-figcaption/

Yours,
Robert W. Pearce
Image with SVG source VoiceOver bug
Tags: a11y, voiceover, html, svg
Published: 2020-09-27 18:55:26

---
title: Image with SVG source VoiceOver bug
published: true
description: Resolving an image-with-SVG-source issue in Safari using VoiceOver
tags: a11y, voiceover, html, svg
---

_Originally posted on https://dear-dia11y.com/image-with-svg-source-voiceover-bug.html_

Dear dia11y,

I recently documented an issue where some decorative illustration `<img />` elements with SVG sources were, when using VoiceOver in macOS Safari, announcing every `<g>` (group) element by narrating the word "image". Here's what the HTML essentially was:

```html
<img
  alt=""
  class="foo"
  src="path/to/file.svg"
/>
```

The `alt=""` should have alerted the screen reader that this was a [decorative image](https://www.w3.org/WAI/tutorials/images/decorative/), but no matter — let's add `aria-hidden="true"` to it.

I recommended this issue and possible fix to a colleague and forgot about it.

This colleague read up on `role="presentation"` versus `aria-hidden="true"` and whatnot and eventually discovered that neither solved the problem! What a mystery.

This person did some digging and discovered that __image elements with SVG sources that aren't marked as `role="img"` can have VoiceOver jump into the SVG document and start reading things__.

The fix?

```html
<img
  alt=""
  class="foo"
  role="img"
  src="path/to/file.svg"
/>
```

That's it! HTML and a11y linters will complain about the repetitive `role`, but we do what we have to do.

It also turned out that this was a problem with non-decorative images. Image alternative text was being read along with the innards of SVG sources (even `<text>` elements!).

Here are some nicely documented test cases of the issue:

* http://pauljadam.com/demos/svg-role-img.html
* http://a11yideas.com/testcode/mwp/iOSsvg.html

Yours,
Robert W. Pearce
Hello, accessibility world!
Tags: a11y, css
Published: 2020-09-27 18:51:44

---
title: Hello, accessibility world!
published: true
description: A programmer's first steps into a larger accessibility world
tags: a11y, accessibility, css
//cover_image: https://direct_url_to_image.jpg
---

_Originally posted on https://dear-dia11y.com/hello-accessibility-world.html_

Dear dia11y,

Today I started an accessibility blog!

I normally write about functional programming, but I've been doing a _lot_ of accessibility (a11y — a…11 letters…y) work this year, and I thought it would be a good idea to write down some of the useful things I've learned.

Don't worry; these will generally be short.

For this first entry, I'd like to share about one of the most common things I come across: when to use `<div>`s versus `<button>`s versus `<a>`s for "clickable" elements.

Unless I have a _very_ good reason not to follow these rules, it's very simple:

* use `<a>` if it changes the window's location
* use `<button>` if I can press on it and something happens
* try to not use `<div>` as a trigger for anything

If I'm concerned about the default browser styling of buttons, here are CSS styles collected from around the internet that will allow me to reset a button's default styling.

```css
.btn-reset {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: none;
  border-radius: 0;
  border: none;
  color: inherit;
  font: inherit;
  margin: 0;
  padding: 0;
}
```

If I have to use `<div>`, make sure I remember to read [MDN's role=button page](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role) and the [WAI ARIA Practices 1.2 button specification](https://www.w3.org/TR/wai-aria-practices-1.2/#button) to figure out how to do it correctly. Most importantly, if I decide I'm going to try to reproduce native browser behavior that all manner of programs and devices rely on, __make sure my team and I know how to test it and not break it in the future__.

I must confess that I've made and continue to make many a11y mistakes, but it's in learning from our mistakes that we are able to grow.

Yours,
Robert W. Pearce
Day 30 of 100DaysOfCode
Tags: 100daysofcode, javascript, codenewbie, functional
Published: 2020-09-27 18:29:34

Today I started reading chapter 8 of Eloquent JavaScript and also started the functional programming challenges at freeCodeCamp.

Functional programming sounds cool and gives another perspective to programming.

Below you can read what are the main characteristics of functional programming written by freeCodeCamp:

"Functional programming is about:

1) Isolated functions - there is no dependence on the state of the program, which includes global variables that are subject to change

2) Pure functions - the same input always gives the same output

3) Functions with limited side effects - any changes, or mutations, to the state of the program outside the function are carefully controlled " [Link to original source.](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming)

### What I did today:

#### 1. Started reading Bugs and Errors - Chapter 8 of EJS
https://eloquentjavascript.net/08_error.html

#### What I learned from it:
* Debugging concepts
* Strict mode
* Testing
* Exceptions


#### 2. Functional Programming Challenges at freeCodeCamp
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/functional-programming

#### What I learned from it:
* Callbacks
* Higher-order functions
* First-class functions
* Difference with Imperative and Declarative code
* Mutations and side effects

#### Time spent learning:
Task 'Reading_EJS'. Elapsed time: 0 h 50 min 28 s
Task 'FCC'. Elapsed time: 0 h 46 min 8 s

#### Total time: 1 h 36 min 36 s
Time spent is tracked by my [TaskTimer](https://www.arttupyykonen.com/tasktimer/) script and the [WakaTime app](https://wakatime.com/about).


### Links and videos

I wanted to learn more about functional programming and found this awesome video. 

{% youtube 0if71HOyVjY %}

For those who read yesterday's post and are looking for another laugh, you can check out this upgraded version of the Jombo video!

{% youtube _WH6cbwZ5m8 %}

Thank you for reading! See you tomorrow!
Rails notes 😱
Tags: rails, webdev
Published: 2020-09-27 18:22:22

When I started with Rails, I came across with something called Rails notes. It amazed me how much rails work for developers.

You just add these tags `#TODO`, `#FIXME`, `#OPTIMIZE` as comments in your files.

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

And when you run `rails notes` you will get something like this.

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

The default tags it searches for are `["OPTIMIZE", "FIXME", "TODO"]` 
If you want to add your custom tags, you can add them. 

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

And while searching you have to use those tags.

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

Thank you for reading it out ❤️. If you find it helpful, don't forget to drop in your likes and comments.
What's the output? Hoisting question
Tags: javascript, webdev, beginners, codenewbie
Published: 2020-09-27 18:09:36

```
var i = 5;
if(true){
  var i = 10;
}
console.log(i);
```

---

**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/)**
Building a project from markdown
Tags: showdev
Published: 2020-09-27 18:08:04

# Building a project from markdown

This post is intented as an helper for my next one :smile:

It aims to briefly demonstrate how one can use [mdr](https://github.com/fennecdjay/mdr)
to build a project from a mdr file, which happens to be a markdown file
with few annotations.

Since I not yet comfortable with technical nor post writing,
I'm leaving a (hopefully commented) script do the explanation.
Please read before running :smile:

``` sh
# create a new directory and cd into it
mkdir GwionTest
cd GwionTest

# clone, build and install mdr
git clone https://github.com/fennecdjay/mdr
cd mdr
make
sudo make install

# get back to GwionTest directory
cd ..

# get the mdr file
curl https://raw.githubusercontent.com/fennecdjay/devto.sh/master/mdr/HelloGwion.mdr -o HelloGwion.mdr

# run mdr on the file, thus building the project
# set the BROWSER variable to the executable of the browser you use
# e.g: BROWSER=dissenter-browser mdr HelloGwion.mdr
BROWSER=<your browser here> mdr HelloGwion.mdr
```

I you see any issues with the wording or anything in this post or the mdr file,
please let me know.
Free private NPM package
Tags: npm
Published: 2020-09-27 18:06:18

Recently I started developping some npm packages to complete some tasks at my job. These are related to some components developped with **Vuejs and Buefy**. 
The thing is that **I didn't want to pay for it** so I started doing some research about how to handle this. 
After some time, I found [Verdaccio](https://verdaccio.org/), which really solved my problem.
> Verdaccio is a lightweight open source private npm proxy registry.  

It allows you to publish your private npm packages in a really simple way. If you want to know more about it, just visit the documentation, my goal is to share this with you. 
Have a nice day
How do you make banners for your posts? 
Tags: help, watercooler, discuss
Published: 2020-09-27 17:52:12

For this one and my next post I'm using [this](https://christopherkade.com/banner-generator/), thanks to a fellow DEV member, but last time I tried to do [one](https://dev.to/fennecdjay/github-discussions-in-your-terminal-4cbd) myself, I got bad reviews (which were all pretty sensible).

I'd like to be able to have [Gwion](https://github.com/fennecdjay/Gwion)'s [logo](https://gist.githubusercontent.com/fennecdjay/44d29b1c18b043e5a1d56a958e4ee524/raw/f85343677357b690e579f7c9f87f7efd3368d4d8/gwion-logo.svg) and add text to it programmatically. Any idea how do that?

More important, what do you use?

---
EDIT: Changed the (missing) banner for one I made using canva.com, according to the suggestions.
The site is very usable, but doesn't seem to have an API, so I might change at one point.