teleren/devto huggingface dataset:
Beautifully designed administration panel for (Nodejs, Laravel, Java Spring, Ruby On Rails , Django , Asp.net Core ...)
Tags: javascript
Published: 2020-01-28 21:35:23

Beautifully designed administration panel for (Nodejs, Laravel, Java Spring, Ruby On Rails , Django , Asp.net Core ...) 
Vespa is not a CMS or a blogging platform but it can be used to create a CMS or a blogging platform, but out of the box it is neither of those. With Vespa you can create any kind of application your heart desires.
Here are some of the awesome Vespa features you'll enjoy ✌muscle

- Scalable and Maintainable architecture
- Back-end agnostic (Connect to any server side including (Asp.net core,Laravel/symphony,Nestjs...)
(Redux, Swagger, Docker) integration
- CRUD Builder
- JWT authentication
- Command-line interface

GitHub: https://github.com/getspooky/Vespa
What has been your favorite API to work with recently?
Tags: webdev, api, discuss
Published: 2020-01-28 21:32:37

---
title: What has been your favorite API to work with recently?
published: true
description: 
tags: webdev, api, discuss
---
Developers often integrate information from other applications into their own software. That's where APIs come in.

A good API is consistent, well-defined, fast, secure, and returns exactly what is requested. Could you re-call some of your recent favorites?
7 Valuable tips for Object Oriented Design 😏
Tags: oop, todayilearned, productivity, codequality
Published: 2020-01-28 21:16:40

Whenever you write any code in an object oriented language, follow the list of suggestions below to make your code easier to change with less effort (A.K.A **decoupled** 🧩)

![](https://media1.giphy.com/media/Rk8CZk8M7UHzG/giphy.gif?cid=790b76111415bb64864e03e86d63cc4038ea3402a06ec5e3&rid=giphy.gif)
1. Separate out parts of code that vary or change from those that remain the same.

2. Always code to an interface and not against a concrete implementation.

3. Encapsulate behaviors as much as possible.

4. Favor composition over inheritance. Inheritance can result in explosion of classes and also sometimes the base class is fitted with new functionality that isn't applicable to some of its derived classes.

5. Interacting components within a system should be as loosely coupled as possible.

6. Ideally, class design should inhibit modification and encourage extension.

7. Using patterns in your day to day work, allows exchanging entire implementation concepts with other developers via shared pattern vocabulary.

I hope these tips have been helpful! 😊

![](https://media0.giphy.com/media/URTRF60r6MPYI/giphy.gif?cid=790b761106cbcb8a8733f4d8f7e683f32c5ffe0b595277b5&rid=giphy.gif)
Can I create a rich content experience on the JAMstack?
Tags: jamstack, jamuary
Published: 2020-01-28 21:16:14

Authorability is a key contributor to the success of the JAMstack. Despite the JAMstack's superior performance in speed and relative cost over other methodologies, the mass adoption of the JAMstack hinges on its ability to operate in a cross  functional team where not everyone is technical.

Content today is incredibly advanced. Thanks to the growing popularity of visual storytelling where text is combined with interactive visuals and compelling graphics, content authors must deliver stunning content experiences to keep users engaged. This entails authoring content that seamlessly blends text with different forms of media like charts and images. In the realm of the JAMstack where raw content is generally represented as markdown, authoring such "rich experiences" is a challenge. This is largely because content is decoupled from code in a typical JAMstack setup and there is huge disparity between how content is created and how content is displayed.

A rich authoring experience demands collaboration between code and content. This way, content creators can craft content that supports the work of developers and vice versa. MDX is one way in which this becomes possible. MDX is a file format, parser and loader that extracts and renders JSX components inside markdown files at build time. Compared to conventional setups where markdown is not configurable beyond injecting HTML directly into files, MDX gives content authors and authoring tools direct access to exposed JavaScript components. When used alongside a design system, developers and content authors can collaborate while still maintaining their relative independence. 

The tablestakes for a rich content experience on the JAMstack is high. 
Only with developments in authoring can the JAMstack become the defactor standard for modern web development. For more on MDX as a rich content experience, check out [this fantastic talk by Josh Dzielak at JAMstack conf London](https://www.youtube.com/watch?v=9FGAwXOE6Y4)
cyberpunk retro crt style display
Tags: codepen
Published: 2020-01-28 21:07:59

<p>Fiddling around with the aesthetic of oldshool CRT displays. Some elements to give a good dirty cyberpunk aesthetic: a simple flickering animation intended to be ambient but not too annoying, scanlines and an unapologetically imprecise pixel font... all in a nice responsive container that should fit pretty much any screen form factor. Could be especially fun as a theme for a text adventure game.</p><p>Published in the public domain under the CC0 license <a href="http://creativecommons.org/publicdomain/zero/1.0/" target="_blank">http://creativecommons.org/publicdomain/zero/1.0/</a>"</p>

{% codepen https://codepen.io/somethingformed/pen/raWJXV %}
CKAD - Revision - Multi-Container Pods
Tags: kubernetes, devops, docker
Published: 2020-01-28 20:58:14

See https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/ for mode details on this topic.

* **Sidecar Container** - Adds some functionality not present in the main container such as logging - this allows for a decoupled and scalable approach rather than bloating main container code. *Prometheus*  and *Fluentd* logging use sidecar containers to collect data

* **Adapter Container** - Used to **modify (adapt)** the data either on ingress or egress to match some other need. An adapter would be an efficient way to standardise the output of the main container to be ingested by the monitoring tool without having to modify the monitor of the containerised application. An adapter container transforms multiple applications to a singular view

* **Ambassador** - an ambassador allows for access to the outside world without having to implement a service or another entry in an ingress controller:
    * Proxy local connection
    * Reverse proxy
    * Limit HTTP requests
    * Re route from main container to the outside world. 
(Open Source Kubernetes-Native API Gateway built on the Envoy Proxy)
S.O.L.I.D - principles of a new reality?
Published: 2020-01-28 20:47:44

Many non-it-specialists start used the principles in different ways. I find networking (marketing pyramids), recruitment management and team-composition or building of an organisation. Honeycombs with communication patterns and small-talks by scripts. It's fun the first few times. But you can't find people... It's like a big theater...
Matching form posts in the Pretenders mock HTTP server
Tags: python, testing
Published: 2020-01-28 20:47:29

I've used the  [Pretenders][pp]  "Fake servers for testing" on a number of work and personal projects, with generally good results.  But I've wished that it was easier to write tests against different HTML form post contents.

Pretenders can return results based on specific URLs (of course), HTTP headers, query string parameters, body contents, and so on. But if that body is the result of a form? You'd better know:

1. If it was sent url-encoded or multipart
2. In what order the fields will be arriving

And be willing to deal with those specifically via RegEx matches.

But I don't *want* to care about those things. I want to say "here are the form fields and values I'm expecting, respond if you see them."

I'd submit a feature request if the project wasn't borderline abandonware[^1]. But hey, that's why we use open source tools, no?

In my fork at [github.com/paulroub/pretenders/tree/match-form-data][fork], I've added an optional `data` parameter to the [`when()`][when] method. It takes a dictionary, *e.g.*

```py
http_mock.when('POST /hello', data={'one': 'first', 'two': 'second'}).reply(b'First and Second passed', times=FOREVER)
```

This will match when a form is posted to `/hello`, and fields "one" and "two" have the expected values. It does not care in what order those fields were passed, nor which encoding method was used to submit the form.

I've submitted a [pull request][pr], but since the project was last touched in 2017 I'm not overly optimistic. In the meantime, you can use the forked version directly, either by saying:

```sh
pip install 'git+https://github.com/paulroub/pretenders.git@match-form-data#egg=pretenders'
```

or by including

```
git+https://github.com/paulroub/pretenders.git@match-form-data#egg=pretenders
```

in your [requirements.txt][req] file.

The fork currently has a userbase of "me", so comments, suggestions, and bug fixes are even more welcome than usual.

[fork]: https://github.com/paulroub/pretenders/tree/match-form-data
[pp]: https://github.com/pretenders/pretenders
[when]: https://pretenders.readthedocs.io/en/stable/http.html#pretenders.client.http.HTTPMock.when
[req]: https://pip.readthedocs.io/en/stable/user_guide/#requirements-files
[pr]: https://github.com/pretenders/pretenders/pull/138
[^1]: If you're starting a *new* project, I'd look at alternatives; [mockttp](https://github.com/httptoolkit/mockttp) is nice, for example.
[mockttp]: https://github.com/httptoolkit/mockttp
Fixing "unable to monitor directories for changes" on Docker for macOS
Tags: docker, macos, debugging, web
Published: 2020-01-28 20:32:26

---
title: Fixing "unable to monitor directories for changes" on Docker for macOS
published: true
description: 
tags: docker, macos, debugging, web
---

Earlier today I ran across this error when trying to run my Docker-ized Ruby on Rails application:

`FATAL: Listen error: unable to monitor directories for changes.`

Obviously, I started Googling. I was confused, because I didn't know if this was my macOS host causing this issue or if it was the Docker container itself. Docker pointed me to [this page](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers) which seemed like it should offer me the solution, and it *kinda* did but not really.

Through trial and error, I found that macOS doesn't have a `sysctl.conf` file by default. I wanted to avoid creating one if at all possible. But I found out that by using `docker ssh` I could get to my Docker container's terminal! Once I discovered that, here are the steps I took to resolve the issue:

1. SSH into the container using `docker ssh`.
2. Run the command provided by [this page](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers): `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`
3. Run `sudo sysctl -p` to refresh your kernel parameters.


Re-run the command you were attempting to run and you should be good to go! From here I was able to start my Rails console and all worked as intended.
Screaming Snake Case
Tags: fission, screamingsnakecase, swag
Published: 2020-02-15 07:42:24

---
title: Screaming Snake Case
published: true
date: 2020-01-28 20:24:20 UTC
tags: FISSION,SCREAMING_SNAKE_CASE,swag
canonical_url: https://blog.fission.codes/screaming-snake-case/
cover_image: https://s3.fission.codes/2020/01/8C096C0B-02E9-4D21-9549-C51BAF112341.png
---
Did you know that different programming languages and certain developer preferences have led to different standards in naming functions, variables, constants, and other programming terms?

Camel case ([wikipedia](https://en.wikipedia.org/wiki/Camel_case)) – or should I say, camelCase – is probably the best known programming naming convention, in either **PascalCase** (initial capital) or **dromedaryCase** versions.

While researching, we were delighted to learn about **kebab-case** -being-a-thing, and you can find a bunch more [letter cases on Wikipedia](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).

But we're here to tell you about **snake\_case** :

> The use of underscores as word separators in identifiers in programming languages is old, dating to the late 1960s. It is particularly associated with C, being found in _[The C Programming Language](https://en.wikipedia.org/wiki/The_C_Programming_Language)_ (1978), and contrasted with [PascalCase](https://en.wikipedia.org/wiki/Pascal_case) (a type of [camel case](https://en.wikipedia.org/wiki/Camel_case)). However, the convention traditionally had no specific name: the Python style guide refers to it simply as "lower\_case\_with\_underscores".  
>   
> Within [Usenet](https://en.wikipedia.org/wiki/Usenet) the name "snake\_case" was first seen in the [Ruby](https://en.wikipedia.org/wiki/Ruby_(programming_language)) community in 2004, used by Gavin Kistner  
>   
> [https://en.wikipedia.org/wiki/Snake\_case](https://en.wikipedia.org/wiki/Snake_case)

This, of course, leads us to SCREAMING\_SNAKE\_CASE – all capitals, often used when defining constants.

And now, a vapourwave inspired illustration:

<!--kg-card-begin: image-->

![Screaming Snake Case](https://s3.fission.codes/2020/01/F621DB83-9E43-4C37-B409-2828F22B3ECF.png)

<!--kg-card-end: image-->

We're a developer focused company, which means we have fun with developer-centric in jokes and illustration. We've made a first run of stickers that you can fill out your postal address on our [swag signup page](https://swag.fission.codes) and we'll get some sent to you.

We've got some other programming related illustrations that will get turned into stickers and other artwork lined up, with **Haskell** -related characters being up next. Haskell also happens to be what we're [writing our backend services in](https://github.com/fission-suite/web-api).

The artist behind this first set of work is **Bruno Monts** , a freelance illustrator and designer from Brazil. You can see his [portfolio on Behance](https://www.behance.net/brunomonts). Thank you Bruno for your great work!

Stay tuned for more fun developer art!
You've done a good job dev.to team & contributors 🙏
Tags: watercooler
Published: 2020-01-28 20:23:10

I just want to take a moment and give my appreciation to the dev.to team and of course all the contributors.

I've never been able to find a community where I felt as welcomed, as comfortable, and as willing to post stuff as here on [dev.to](dev.to), and of course the well-designed website helps :P

I just wanted to take a moment and **thank you guys** for making such a cool community for developers to share their knowledge and questions! 🙏🙏
Telegram notifications available with Diun 2.3
Tags: docker, registry, telegram, go
Published: 2020-01-28 20:19:27

---
title: Telegram notifications available with Diun 2.3
published: true
description: Receive notifications when a Docker image is updated on a Docker registry.
tags: docker,registry,telegram,golang
---

{% github crazy-max/diun %}

[**Diun**](https://github.com/crazy-max/diun) 2.3 🔔 has been released and adds support for Telegram notifications:

![Telegram notification](https://dev-to-uploads.s3.amazonaws.com/i/nftaezs2u0xwqvngocmd.png)

---

Support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) 👏 or by making a [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely! 🚀

Thanks again for your support, it is much appreciated! 🙏
Getting the integer part from a number in Javascript
Tags: programming, javascript
Published: 2020-01-28 20:17:51

---
title: Getting the integer part from a number in Javascript
published: true
date: 2020-01-28 20:15:18 UTC
tags: programming,javascript
canonical_url: https://siderite.dev/blog/getting-integer-part-from-number-in-javascript/
---

Original url at https://siderite.dev/blog/getting-integer-part-from-number-in-javascript

Just a thing I learned today: using the bitwise not operator (~) on a number in Javascript ignores its fractional part (it converts it to integer first), therefore using it twice gives you the integer part of original number. Thanks to [fetishlace](https://dev.to/fetishlace) for clarifications.

Notes:
- this is equivalent to (int)number in languages that support the int type
- this is equivalent to Math.trunc for numbers in the integer range
- this is equivalent to Math.floor only for positive numbers in the integer range

Examples:
`~~1.3 = 1`
`~~-6.5432 = -6`
`~~(2 ** 32 + 0.5) = 0`
`~~10000000000 = 1410065408`
How does print function usually works?
Published: 2020-01-28 20:09:15

**Golang** 

```golang
import "fmt"

func main() {
  fmt.Println("Hello World");
}

```

it's kind of easy to write, but not for beginners to understand. You can write this code and call yourself as "programmer" but you must to understand a root of this code.

```golang
import "fmt"
```

"fmt" is just library with useful function. FMT package looks probably so 

```golang
package fmt 

func Println(String text) String {
  return text
}
```
Job Control Commands in Linux
Tags: linux
Published: 2020-01-28 20:08:02

Job is simply a process. In Linux, each job is associated with PID.

There are three types of jobs:

### Foreground Jobs

When you run `vi <file>`, the `vi` program "occupies" the terminal window, and the process runs in the **foreground**.

When you exit the program, the application is no longer running, and the process dies.

### Background Jobs

Processes that are running without occupying the window. This can be achieved, for example, by appending `&` at the end of the command. For example, when you run:

```sh
tar -czf file.tar.gz .
```

the `tar` process will block the terminal until it finishes. However, when you run:

```sh
tar -czf file.tar.gz . &
```

then it'll run in the background. And if you type `jobs` while it's still running:

```sh
jobs
[1]+  Running                 tar -czf file.tar.gz . &
```

### Stopped Jobs

<kbd>CTRL + z</kbd> sends the `SIGTSTP` signal that stops the job that's runnin in the foreground.

### Job Control Commands

* `jobs` - lists all jobs
* `bg [PID...]` - takes the specified job(s) to the background, resuming them if they are stopped.
* `fg [PID]` - brings the specified job to the foreground, resuming it if it is stopped
* <kbd>CTRL + z</kbd> - Sends the `SIGTSTP` signal that stops the running job

The following should demonstrate the commands above:

```sh
> tar -czf file.tar.gz .
# ...working...
# CTRL + z
Job 1, 'tar -czf file.tar.gz .' has stopped
> jobs
[1]+  Running                 tar -czf file.tar.gz . &
> fg %1 (or just "fg" since there's only one job)
# job restarts
```

That's all :)
time.sleep in Python
Tags: python, time
Published: 2020-01-28 20:03:25

<a href="https://python.org">Python</a> has a module to deal with time. This lets you pause/wait some time in your code. To do this, first import the time module

    #!/usr/bin/python3
    import time

Then you can use the method sleep().

## Pause in Python

To sleep or wait, you can use time.sleep()

    time.sleep(secs)

To sleep for five seconds

    time.sleep(5)

You can also use this to sleep milliseconds

    time.sleep(.500)

Thus, the parameter seconds can be either an integer or floating point number.


## Pause vs threading

To be clear, it pauses the whole program: "Suspend execution of the calling thread". That means that while it is in the sleep method, it does absolutely nothing, not even listen to keyboard or mouse input. 

If you want to do several things at once, look into <a href="https://pythonprogramminglanguage.com/threading/">threading</a>. Every task runs in a thread, so the program could be pausing while still getting keyboard input or receiving to network data.

<img src="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fpitchenginelive.blob.core.windows.net%2Frefinery%2F28f29690-4305-4640-95e9-c04dab195652%2FGallery%2F4df83d29-aac3-4158-aed7-103e1aa26745.png&f=1&nofb=1" alt="threading">

## How accurate is time.sleep() ?

The sleep method in the Python time module uses the operating systems sleep() function. In other words, the systems sleep code. 

Because operating systems are not accurate like an atomic clock, they have some delay. But don't worry, this delay is usually 1-10 milliseconds and does not matter for 99% of the apps.

**Related links:**

* <a href="http://docs.python.org/3.0/library/time.html">Python time module</a>
* <a href="https://pythonbasics.org/time-and-date/">Time and date in Python</a>
* <a href="https://pythonbasics.org/">Python tutorial</a>
Branding a library, where to get a logo?
Tags: design, help
Published: 2020-01-28 20:00:11

I will happily pay somebody to make some branding for an open source project I am working on, yes I believe in it that much.  I would do it myself but I fear my illustrator cs5 student license is umm very much null and void at this point.

I am also looking for website documentation concepts as well. Anyone willing to recommend a place to get that sort of thing done, or know anyone who could do it on here. I would like it if that person could code or understand the ecosystem that is front-end but honestly, if the result is great, then who cares.

I hope this doesn't offend moderation. 🤞
What's your worst on-call story?
Tags: discuss
Published: 2020-01-28 19:15:23

---
title: What's your worst on-call story?
published: true
tags: discuss
---

So I've been on the on-call roster for my work for about 6 months now and it still hasn't grown on me.

The worst time I've ever had was getting 5 consecutive days of 1am call outs for complete non-issues 😭

So for a bit of fun, I'd thought I'd ask those in the DEV.to community who are go on-call what their worst stories were of being on-call, so we can all share our misery together 😂
What social links should devs include in their resumes?
Tags: webdev, career, discuss
Published: 2020-01-28 18:51:02

---
title: What social links should devs include in their resumes?
published: true
description: 
tags: webdev, career, discuss
---

Including just an email might not be enough, as recruiters would like to take a deeper look of your online presence and developed projects.

There are quite many to choose from - Personal portfolio, GitHub, Facebook, Twitter, Dribble, Behance, StackOverflow, Codepen, Codewars, LinkedIn, Medium, DEV.to and so on. 

So, which ones did make it in your current resume?