teleren/devto huggingface dataset:
How to hide your API endpoints while making an electron app?
Tags: help
Published: 2019-01-20 14:03:47

---
title: How to hide your API endpoints while making an electron app?
published: true
tags: help
---
What is the best way to hide your API endpoints in an electron app?

As one can always and check code of your electron app like this.

![](https://media.giphy.com/media/ctu2DglfIGkq0lC0il/giphy.gif)

So what is the best, recommended approach here?
My dev life has just started 😎👩‍💻
Tags: discuss, beginners, python, career
Published: 2019-01-20 13:37:28

Hi there all this is my first post on [dev.to](dev.to) (I love this platform 😍👍).

This is regarding any advice all the *experinced* developers can give me as I have just started my very first internship as a **Backend Developer** at [DyfoLabs](https://dyfolabs.com).

I will be working on problems in home automation and using IoT to solve them.

I would like to thank 😄 all those people who posted a lot of great content on [dev.to](dev.to) regularly .

I have learned so much during these 3,4 months(my presence on *dev*)  through *dev.to* which I guess may have driven me to this opportunity.

Once again thank you all (I wish I could tag all of them ☺️).

Please do share your thoughts.
What do you do to practice new programming languages and/or frameworks?
Tags: discuss, programming
Published: 2019-01-20 13:34:13

---
title: What do you do to practice new programming languages and/or frameworks?
published: true
description: What to do to practice and learn new technologies when you don't have any creativity for projects?
tags: discuss, programming
cover_image: https://thepracticaldev.s3.amazonaws.com/i/322ahaq7ome0rpko7ram.jpg
---

I've been struggling with this problem for a while now. I'm curious, I like to experiment new things, be it languages or frameworks, but for that it is important to have some idea to code with. Just do the tutorials is not enough for me, it is generally too easy, so I need something more real to practice. However, I don't have much creativity to projects. I try to think about some problem that I may have and would like to automate or something linked with my hobbies that would be nice to create. I do have some projects slowly evolving, but since they are a little more complex, I tend to use things I'm already fairly familiar with, so it doesn't count. I also try to find open source projects on GitHub that I could contribute, but the well kept ones are generally too hard for someone who wants to practice the basics, it is intimidating.  

So, the question is, what to do when you want to practice something, but doesn't have an idea of project to try it on? There are sites that can help with that? Front-end, back-end or both. What do you do when you are in this kind of situation?
Do's and Don'ts at your very first Meetup
Tags: typescript, meetup, webdev, beginners
Published: 2019-01-20 12:42:00

---
title: Do's and Don'ts at your very first Meetup
published: true
description: 
tags: Typescript, Meet Up, webdev, beginners
---


![First Speaker speaking about basics of typescript](https://thepracticaldev.s3.amazonaws.com/i/axiijd0sq54406d7nbdx.jpg "First Speaker speaking about basics of typescript")

Meet Ups are absolutely amazing. You get to meet a lot of new people who share the same interest. 
It was the same for me as well. The only thing was my first meetup was an unknown topic for me.

So, this was my first meet up (Typescript). I wanted to go to so many other meetups but I simply didn't have the courage to go. I finally gathered all the courage to go to one. It was also because my brother was one of the assistant hosts. It took me a lot of time to finally go to a Meet Up. Let's have a look at the dos and don'ts :)

![Recruiter advertising](https://thepracticaldev.s3.amazonaws.com/i/p7otvoq3qxejsgbh8jkb.jpg "Recruiter advertising")

## Don't be afraid to go to the Meet Ups. They are not that scary at all.

Being a beginner in the dev community, I somehow felt out of place in the meetup. I had absolutely no idea about typescript (though I have done some Node.js). Luckily, it was a talk for beginners and I managed to get some tips and gained knowledge of Typescript. 

## Do background research on what the meetup is about and try to get some knowledge beforehand.

So, there I was, a shy person sitting in a corner just listening to others. What I saw was everyone talking to everyone even though they met for the first time. It was amazing how people can connect so quickly. 

## Be proactive and try to talk to people. 

Initiate the conversation if needed. All the people are there to meet new people as well.
During the talk, there was a moment where the recruiters were invited to share if there were any vacancies available at the moment. That was a surprise for me. I had no idea that the recruiters will actually come to meetup to find the suitable candidates. This was the opposite for me where I was applying to jobs and recruiters were not connecting to me. However, the position they were looking for was not on my criteria and I was a bit sad about it. So, I did not make an effort to talk to the recruiters. So, my fourth point is 

## Find recruiters and talk to them. 

Even if you know that what they are looking for is not you but try to make an impression and keep them on your contact list. Who knows when that opportunity will come to you. (I felt this after I walked out from the MeetUp)

## Conclusion

So, in overall, my first meetup somewhat of progress for me. I am a very shy and introverted person. 
I do not socialize well. However, my first meetup has given me a lot of confidence for the next. I hope this will 
help a lot of you beginners and introverted programmers like me to gain some courage to attend a meetup and 
open up yourself in the dev community.
This Week I Learned: A Little Bit About Releasing An Application Into Production
Tags: agile, production, release
Published: 2019-01-20 12:10:38

---
title: This Week I Learned: A Little Bit About Releasing An Application Into Production
published: true
description: My weekly "This Week I Learned" blog post describing my experiences as I went through the process of releasing my application to Production at the workplace.
tags: Agile, Production, Release
---

I have learned many valuable lessons while applying Agile to my day-to-day programming practices, none of was more influential to the past week than the rule of thumb "make the deployment process a routine, predictable, non-event." Although my company does not formally make use of any Agile practices, I personally follow several Agile principles in my daily workflow and I reaped the rewards when I took the steps to move my application in to processing Production sales orders.

This was my first true release experience and I was quite pleased that only two minor bugs were found as we ran the first order through - the total price was wrong on the confirmation email that would have been sent to the sales associate. We also caught a small check to be made in the case of an order with an error that needed to be run back through after its Sales Order GUID had been assigned.

My manager and I were not surprised that the total price field contained the wrong value. It had not been put under the scrutiny it deserved during development and I realize now that was a mistake - this confirmation email is sent to the sales associate and forwarded to their customer. It acts as a billing or payment received statement, and absolutely must reflect what the customer expects.

I finished out my week diving back into the application to get down and dirty with the pricing problem. I was able to resolve the issue after a lot of back and forth with my manager; this was a process that had been reworked a great deal. Along with the fix, I added a conditional ahead of the email confirmation method: If our unit price does not match the total price reflected on the Salesforce quote, an error email is sent to myself and my manager and the confirmation is *not* sent on to the sales employee. This prevents any future potential unit price bugs from ever reaching the customer.

Another rule I follow is to never release on a Friday afternoon, so I'm looking forward to sending the application back into production on Monday morning... Hopefully for the final time!
Thenables: Await objects and cancel or defer your promises!
Tags: javascript, es6, promises, async
Published: 2019-01-20 11:30:40

---
title: Thenables: Await objects and cancel or defer your promises!
published: true
description: A little introduction to thenables with some examples of how they can be used to replace or enhance the experience of promises.
tags: javascript, es6, promises, async
---

You're likely already using `await` with promises to receive values without creating a callback:

```js
async function example(){
	const data = await loadSomething()
	// Use data for something...
}
```

But did you know you can use `await` with objects other than promises?

The `await` syntax can be used to wait for the completion of any `thenable` (an object containing a `then` function that takes a callback)! For example:

```js
function wait(time){
	return {then: done => setTimeout(done, time)}
}

async function example(){
	console.log('Hello...') // Logs immediately 
	await wait(1000)
	console.log('World!') // Logs after one second
}
```

This also means that instances of any class with a `then` method can be used with `await`:

```js
class Wait {
	constructor(time){
		this.time = time
	}

	then(callback){
		setTimeout(callback, this.time)
	}
}

async function example(){
	const delay = new Wait(1000)

	console.log("Hello...")
	await delay
	console.log("World!")
}
```

Using thenables it's **super** easy to implement deferred and cancelable promises. This allows you to *skip to the end* of a promise or stop it from ever resolving at all!

```js

class Deferred {
	constructor(){
		this.canceled = false
		this.promise = new Promise((resolve, reject) => {
			this.resolver = (value) => {
				if(!this.canceled) resolve(value)
			}
			this.rejecter = (value) => {
				if(!this.canceled) reject(value)
			}
		})
	}

	resolve(value){
		this.resolver(value)
	}

	reject(value){
		this.rejecter(value)
	}

	then(onFulfilled, onRejected){
		this.promise.then(onFulfilled, onRejected)
	}

	cancel(){
		this.canceled = true
	}

}
```


Do you use thenables over promises anywhere in your codebase? Share your use cases in the comments!

Also, thanks for reading my first post!
How to start map with HEV suit on?
Tags: sourcesdk, hammereditor, valvehammereditor, halflife2
Published: 2019-01-20 11:26:44

---
title: How to start map with HEV suit on?
published: true
description: Quick guide for Source SDK / Hammer World Editor
tags: sourcesdk, hammereditor, valvehammereditor, halflife2
---

> Quick guide using Hammer Editor 4.1, Build 6412, Source SDK Base 2013 Singleplayer [upcoming]

If you just put `info_player_start` and start map, you will have no the HEV suit: you cannot run, you have not crosshair, no flashlight, and so on. It's good if you want to give HEV suit to player after map is started, but you may want to start map with a battle.

The easiest and obvious way to do this is put `item_suit` entity right over the `info_player_start` entity, but you will start game with "logon sound" and hands animation, when Freeman takes HEV suit in the first time in Isaac Kleiner lab in City 17.

![item_suit right over info_player_start](https://thepracticaldev.s3.amazonaws.com/i/6x0xa0u514zvzv6qlqi0.png)

> crook lvl 1

If you want to start map without hands animation and "logon sound", here's a short guide:

1. Create entity: `point_servercommand`
1. Name: give it any name, `command` for example
1. Create `logic_auto` entity
1. On Outputs tab, add new with button in bottom of the window
1. My output named: `OnMapSpawn`
1. Targets entities named: name of `point_servercommand` entity you created before
1. Via this input: `Command`
1. With a parameter override of: `give item_suit`

![info_player_start point_servercommand logic_auto](https://thepracticaldev.s3.amazonaws.com/i/hf3u8xu1obm0crfl51wq.png)

> lvl 35 boss

In short, we create a trigger that runs when map is started, and it run console command to get a HEV. You can try type `give item_suit` in game console and will have the same.
BxJS Weekly Episode 46 - javascript news podcast
Tags: javascript, node, podcast, news
Published: 2019-01-20 09:02:39

---
title: BxJS Weekly Episode 46 - javascript news podcast
published: true
description: Listen to the best javascript news of the week in a podcast form
tags: javascript, node, podcast, news
---

Hey dev.to community!

BxJS Weekly Episode 46 is now out! 🚀
Listen to the best javascript news of the week in a podcast form right here.
You can find all the mentioned links [here on github](https://github.com/BuildingXwithJS/bxjs-weekly/blob/master/links/19-03-Episode-46.md).


You can also watch or listen to this episode on:
- [YouTube](https://youtu.be/AqvwxbEuuNY)
- [Castbox](https://castbox.fm/episode/BxJS-Weekly-Ep.-46-Jan-19%2C-2019-(javascript-news-podcast)-id1378315-id121358179?country=us)
- [iTunes](https://itunes.apple.com/de/podcast/bxjs-weekly/id1441956525)

Any feedback is appreciated 😁

Additional stuff:
- [Twitch channel](https://www.twitch.tv/yamalight)
- [Discord server](https://discord.gg/hnKCXqQ)
- [BxJS Weekly github repo](https://github.com/BuildingXwithJS/bxjs-weekly)

Social media links:
- [Twitter](http://twitter.com/yamalight)
- [Medium](https://medium.com/@yamalight)
- [Github](http://github.com/yamalight)

If you enjoy my content, please consider [supporting me](https://codezen.net/support.html) 😉
LESS Really is More
Tags: discuss, css, javascript
Published: 2019-01-20 08:12:42

---
title: LESS Really is More
published: true
description: 
tags: discuss, css, javascript
---

The other day I got around to using LESS which, admittedly, I had no idea was not some component of SASS/SCSS. I am now loving it. If you've used SASS maybe you know why? Or maybe I have no idea how to use SASS?

# A few things about SASS

For example SASS uses keywords heavily, and odd symbols, that do not mesh well with the front-end syntax.

A variable is prefixed with a '$', other than that it is similar to LESS and JS.

```scss
$text-color: #06f;
```

If you want to share the declarations of another ruleset (class, element, id) you use the 'extend' keyword or a mixin which is like a function; Mixins use the 'include' keyword.

```scss
@mixin easyFlexContainer( $type, $flow, $justify, $items, $content ){
  display: $type;
  flex-flow: $flow;
  justify-content: $justify;
  align-items: $items;
  align-content: $content;
}

.ulIsAnnoyingNavElement {
  padding: 0em;
  margin: 0em;
}

.main-nav {
  ul {
    extend .ulIsAnnoyingNavElement;

    include easyFlexContainer(flex, row wrap, flex-start, center, flex-start);
  }
}
```

Don't get me wrong, this is all fine and you can get used to it, but a simple comparison will hopefully explain why I think LESS is so much better.

# How is LESS awesome (in my opinion)?

Only looking at a few different components of SASS should give you a general idea of what to expect. Here is how LESS differs. LESS boils a lot of prefixes down to two things, LESS prefixes use '@', and less constructs are functions.

What I mean by less 'constructs' are 'functions' is that you can think of things in LESS as literally usable functions, no need for magic keywords, just use it!

```css
@text-color: pink;

.makeItPretty {
  padding: 0em;
  margin: 0em;
}

.easyFlexContainer( @type, @flow, @justify, @items, @content ){
  display: @type;
  flex-flow: @flow;
  justify-content: @justify;
  align-items: @items;
  align-content: @content;
}

/* Client Ruleset */
.main-nav
  ul {
    .makeItPretty();
    .easyFlexContainer(flex, row wrap, flex-start, center, flex-start);
  }
}
```

Yup that's all I wanted to share. LESS is pretty amazing, treating classes as functions and mixins, or when not using '()', just classes!
How 2 software development principles can save your project
Tags: code, dev, programming, tech
Published: 2019-01-20 01:16:55

---
title: How 2 software development principles can save your project
published: true
description: Apply some design patterns and good practices and save your software.
tags: code, dev, programming, tech
cover_image: https://thepracticaldev.s3.amazonaws.com/i/yf9fa3yj3z3zy19e8dj3.jpg
---


Do you want to read funny stories and improve your software development skills?

See the [full post on medium](https://link.medium.com/wAH4fguXBT)

I hope you enjoyed it.
Stop being a toxic person, start to have empathy.
Tags: discuss, empathy
Published: 2019-01-20 00:31:12

---
title: Stop being a toxic person, start to have empathy.
published: true
description: How to help or tell someone that your behavior is toxic?
tags: Discuss, Empathy
---

On our daily work we usually share ideas, do some pair programming and conversation about problems we have to fix or something we're struggling with. It's normal, great and at the end the day/talk when you fix the problem or solve your doubt, is just amazing.

This kind of situation involves a lot of contribution, team work and the most important thing, *EMPATHY*.

A lot of people work together and at some companies there are a lot of toxic people who's there to bring other person down, although the toxic person even realize that behavior, he/she is there and is being bad for someone.

I've been working with toxic people on my entire career and the feeling of having a conversation with the person is almost always a bad thing, at the end of the conversation I feel sad and anxious because I can't do nothing to not create a embarrassing situation on my team or work.

This kind of people sometimes needs help, telling them to stops being like that and have empathy for someone is something that could help, not directly but talking with your manager/team leader is valid.

## ☔️ I'm telling that because I want to know from you guys if it's common at your work this kind of situation and how to tell someone that's being toxic to stops and start to be better? ☔️

*(I know some people can't change, but a lot of people don't know they are toxic)*
template engines still ignore the power of the DOM
Tags: domtemplateheadless
Published: 2019-01-20 00:19:24

---
title: template engines still ignore the power of the DOM
published: true
description: first the DOM, then the template
tags: DOM template headless
---

I need you to **leave** php-thinking today.
Why ?
Because that kind of thinking makes you build "string-based" template engines, and this is bad.

Obviously it's bad security-wise, string-based engines don't know where they're 
merging data in an attribute, a tag name, pure text, or html.
They have a hard time keeping it right because the DOM evolves too fast for them.

The DOM should come first, then templating after.
Embrace the DOM. Don't try:
- [hyperhtml](https://www.npmjs.com/package/hyperhtml)
- [marko](https://www.npmjs.com/package/marko)
because they're just fiddling around the DOM.

I've been trying to make something purely DOM based:
https://github.com/kapouer/matchdom

however, i recognize the API is odd.

Please help me improve it if you're motivated !
CAA records only have a meaning in a world without *free* SSL providers
Tags: dnssslmafia
Published: 2019-01-19 23:47:22

---
title: CAA records only have a meaning in a world without *free* SSL providers
published: true
description: i try to explain why in a few words
tags: DNS SSL MAFIA
---

`thatsheepdomain.com CAA 0 "evilexpensiveauthority.com"`

A good-looking [https://tools.ietf.org/html/rfc6844](RFC 6844) came out five years ago: DNS CAA.
That looks cool, and even ssllabs has a warning shown when it's not there.

I thought it was awesome and [lobbied around](https://github.com/AnalogJ/lexicon/issues/282) to support this !

Except that today i'm here to warn you about that thing.

CAA record is meant for organisations to make sure everyone within is using the same SSL certificate authority for the websites under a given root domain name.

All contractors providing `xxx.thatsheepdomain.com` need to get certificates from "evilexpensiveauthority.com".

This often is enforced as a company policy, to make sure there's only one provider of certificates - and only one way to deal with those scary certificates - after all, failing to update them can break a service.

That kind of internal company policy has always been around, sometimes for very good reasons, and now it can be enforced by an official standard. There are tractations to make browsers use it. Mozilla accepted it, [let's encrypt](https://letsencrypt.org/docs/caa/) honors it.

Looks good ?

But hell is in the details.

For some years Let's encrypt + open-source acme protocol + open-source certbot client (or any other acme-compatible client) has been delivering hundreds of millions of free SSL certificates, prompting "Legacy" companies (the ones asking for money, and whose employees wrote the RFC about CAA, just check the link) to push their customers to use CAA records, as a reaction to the unbearable open and free movement.

I suppose the non-free companies use the "be scared of security issues" tactic.
Please quickly enforce a company policy or face hell.
A company adopting such a policy will make sure there is no disparate SSL authorities contractors.

Q.E.D.

CAA records only have a meaning in a world without *free* SSL providers.
A Little about IPFS
Tags: ipfs, protocol, web, p2p
Published: 2019-01-19 22:56:01

---
title: A Little about IPFS
published: true
description: 
tags: ipfs, protocol, web, p2p
---
Today I watched the video about IPFS. I cannot fully understand it and I will watch it again.

{% youtube jONZtXMu03w %}

Here is a short intro of IPFS:

>IPFS is, as the official website describes 
>"peer-to-peer hypermedia protocol to make the web faster, safer, and more open". 

![](https://res.cloudinary.com/practicaldev/image/fetch/s---pG_EJOY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lqh1tsxch21kwlbjfz4r.png)

{% link https://dev.to/terceranexus6/security-sprint-the-new-internet-7fj %}
Error installing from AUR with yay on Manjaro Budgie
Tags: git, linux
Published: 2019-01-19 22:07:15

A few months ago I did a fresh installation of **Manjaro Budgie** on my Lenovo G480. When I was trying to install a package from **[AUR](https://aur.archlinux.org/)** using **[yay](https://github.com/Jguer/yay)** I got the following error:

```bash
error cloning package
```

With every package I tried to install I received the same error. I updated the mirrorlist with **pacman-mirrors** and reinstalled yay but the error persisted.

After googling a little and don’t find any solution I thought that the problem was related to Git as some packages are stored on Git repositories.

It turns out that Git is a dependency of yay but it isn’t installed by default. It also happens that installations from AUR are made through a fakeroot environment. So the solution was to install both packages before using yay.

```bash
$ sudo pacman -S git fakeroot
```

I hope it helps you If you get this error while trying to install packages from AUR.