teleren/devto huggingface dataset:
A different approach working with Ansible variables
Tags: devops, ansible, sre
Published: 2021-04-12 20:15:47

When using folders to organize Ansible projects, usually we use the `host_vars` subfolder to store the variables that belong to hosts declared in our inventory files, ending with something like this in our hands:

```
.
├── group_vars
├── hosts
├── host_vars
│   └── host-01.yml
├── roles
│   └── webservers
│       ├── files
│       ├── tasks
│       │   └── main.yml
│       └── templates
└── webservers.yml
```

Here, we're using the `hosts` file as our inventory, which has only one host, `host-01`, and storing all its variables on the `host_vars/host-01.yml` file.

For many people, this approach will work just great, with absolutely nothing wrong with it. But as our infrastructure grows, so does the number of variables, and manage it can become a little bit cumbersome, with two major problems:

Over time all variables from all subjects (different roles, for instance) are stored in the same place, so it can become quite messy.

The second problem is that when you're using **Ansible Vault** to encrypt files that contains sensitive information, like passwords, you have a workflow similar to this:

- Run `git pull`
- Edit your file with `ansible-vault edit ${file}`
- Commit your changes
- Run `git push`

But in this approach, you have to that even you're not changing anything sensitive-related, which is a bummer.

To solve those two problems, what you can do instead is create a folder inside `host_vars` with the name of your host, and inside of it YAML files containing your variables. Ansible automatically will concatenate them when called. Then, use Vault just for the files that have sensitive information (here, for instance, we're assuming that for the  `host_vars/host-01/password.yml` file). Here's an example:

```
.
├── group_vars
├── hosts
├── host_vars
│   └── host-01
│       ├── main.yml
│       └── passwords.yml
├── roles
│   └── webservers
│       ├── files
│       ├── tasks
│       │   └── main.yml
│       └── templates
└── webservers.yml
```

You can have as many YAML files you want inside the folder, and by the way, you don't have to name "main.yml" any of them.

Abraços!
Using "noopener" and ”noreferrer” against Phishing Attacks
Tags: webdev, cybersecurity, security, html
Published: 2021-04-12 19:24:45

Want to help users to avoid some Phishing Attacks with **HTML**? 

👉 Use `rel="noopener noreferrer"` while adding external links to your website to improve user navigation security. 

```html
<a rel="noopener noreferrer" href="https://...">
 External Link
</a>
```

---

🐿 **noopener**: tells the browser to remove sensitive data from `window.opener` object when the user arrives at the destination website.

🤓 **noreferrer**: protect sensitive data of the origin website removing it from the `Referrer` header while the user navigates between origin website and destination website.

---

😋 Super easy security strategy to implement. Adopt this recommendation without moderation.
Simple PowerShell Password Generator
Published: 2021-04-12 19:11:23

```powershell

$Alphabets = 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'
$numbers = 0..9
$specialCharacters = '~,!,@,#,$,%,^,&,*,(,),>,<,?,\,/,_,-,=,+'
$array = @()
$array += $Alphabets.Split(',') | Get-Random -Count 4
$array[0] = $array[0].ToUpper()
$array[-1] = $array[-1].ToUpper()
$array += $numbers | Get-Random -Count 3
$array += $specialCharacters.Split(',') | Get-Random -Count 3
($array | Get-Random -Count $array.Count) -join ""

```
Abusing Public DNS for Zerotier Routing
Tags: dns, zerotier, vpn
Published: 2021-11-09 23:38:23

---
title: Abusing Public DNS for Zerotier Routing
published: true
date: 2021-04-12 19:11:22 UTC
tags: dns, zerotier, vpn
canonical_url: https://ivans.io/abusing-public-dns-for-zerotier-routing/
---

## Picking a Mesh VPN

I've been a big fan of [mesh VPNs](https://www.csoonline.com/article/3575088/mesh-vpns-explained-another-step-toward-zero-trust-networking.html) for many years now. It's great to not have to deal with [Strongswan](https://www.strongswan.org/) or [OpenVPN](https://openvpn.net/) on a central server. Mesh VPN's also come with intelligent routing, so if both of my devices are at home on the same network they will dial each other directly. This concept also combines nicely with my interest in setting up a [BeyondCorp](https://research.google/pubs/pub43231/) analog for my home use.

I used to run a private cloud on [Tinc](https://www.tinc-vpn.org/), but adding new devices was extremely cumbersome and there is no mobile device support.

After looking into alternatives, I discovered [Tailscale](https://tailscale.com/%20) and [Zerotier](https://www.zerotier.com/). I don't need the hardcore firewall rules of  [Tailscale](https://tailscale.com/%20), so I decided to set up [Zerotier](https://www.zerotier.com/) on all of my devices. The installation truly is less than 5 minutes - I am impressed.

## Abusing DNS

I can set custom IP's in my [class B](https://study-ccna.com/classes-of-ip-addresses/) address space (prefix 172.xx), but I don't want to memorize them all. Even though it's not up to DNS spec, we can set internal IP's as A records on [Amazon Route53](https://aws.amazon.com/route53/) and have them resolve to the Zerotier address space.

I don't view it as a strong security risk, because even if someone knows my internal VPN IP, they still have to break into the network to route any requests to my devices.

By setting up semi-proper DNS for my machines, I can completely detach from the physical network layout and have all of my proxies and scripts reference the internal VPN DNS names. This works extremely well - I can move my server and plug it into any network, and still be able to access it.

## Mobile Support

Most importantly, I now have easy addresses to use on my mobile devices. I can install the [app](https://apps.apple.com/us/app/zerotier-one/id1084101492) and join my network, then use Files, [Termius](https://termius.com/), or [Solid Explorer](https://play.google.com/store/apps/details?id=pl.solidexplorer2&hl=en_US&gl=US) to view my files and media on the go.
3D Mood Board Prototype - [Code Overview]
Tags: react, javascript
Published: 2021-04-12 19:03:37

{% youtube HBGwisNYoa0 %}

A Prototype 3D mood board tool made with React and React-Three-Fiber

a side project I started to get used to using React-Three-Fiber
https://github.com/pmndrs/react-three-fiber

Repo for project
https://github.com/drnoir/3D-Image-Board-Viewer-
Achieving SOC 2 Compliance
Tags: security, devops, infrastructure
Published: 2021-09-08 05:47:34

---
title: Achieving SOC 2 Compliance
description: Developers and organizations trust Doppler with securely managing and serving millions of secrets to their applications and we're excited to announce that Doppler has achieved SOC 2 Compliance.
cover_image: https://assets.website-files.com/5de9972f49103c9dc496402b/60615a36da25b33c325cfeb9_doppler-achieves-soc-2-compliance.jpg
published: true
date: 2021-04-12 19:00:00 UTC
tags: security,devops,infrastructure
canonical_url: https://www.doppler.com/blog/soc-2-compliance
---

Developers and organizations trust Doppler with securely managing and serving millions of secrets to their applications. We earn and keep that trust through methods such as [ongoing rigorous external testing and data tokenization](https://www.doppler.com/security), but we’re always looking for opportunities to increase Doppler’s security posture.

That’s why we’re pleased to announce that Doppler has achieved SOC 2 Type 2 compliance.

Doppler adheres to a set of principles that emphasize designing with security in mind from day one, not just in our codebase and system architecture, but how we operate our business and support our customers.

You can learn more about Doppler’s commitment to security at [doppler.com/security](http://doppler.com/security) and by viewing our [security fact sheet](https://docs.doppler.com/docs/security-fact-sheet).

---

[![Create your free Doppler account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcu1dmvld1wzmz3b0wl0.png)](https://dashboard.doppler.com/register?utm_source=dev&utm_medium=blog&utm_content=doppler-achieving-soc-2-compliance-4koj)
Delaying the executing of a PowerShell script until a certain time.
Published: 2021-04-12 18:59:59

This script waits until 18:30 then run the lines under it to 
a) set the Backup service to the Startup type Automatic then 
b) Start the service in question

```powershell
start-sleep ((get-date "18:30pm") - (get-date)).TotalSeconds

Set-Service -Name "Backup Service Controller" -StartupType Automatic; 
Get-Service -Name "Backup Service Controller" | Start-Service
```
Upcoming epispot and epispot nightly features
Tags: epispot, epinightly
Published: 2021-04-12 18:58:24

We're here to annonunce some new features that will be added (or hopefully added) over the next coming days to epispot nightly. Some of them include:
1) Exporting and Importing epispot models
2) A CLI
3) New Graphs!

## Exporting and Importing Models
This feature is underway, and will allow users to quickly and easily share they're epispot models. When finished, it should look like the following for reading and writing.

Writing a model to a `.yml` file:
```python
import epispot as epi

model = epi.models.Model([params])
epi.models.write(model, file_type='yml')
```
Reading a `.yml` file with a epispot model:
```python
import epispot as epi

epi.models.read('model.yml', 'model.py')
```
The above will create a file named model.py with the code to the model.

## A CLI
Epispot Nightly is getting a brand new CLI! Infact, the code for a _very very_ basic CLI already has a PR. What can it do? Just the command `epispot about` which outputs metadata about the package. However, this will be extended to other uses, such as what we described earlier for importing and exporting models. The PR can be viewed [here](https://github.com/epispot/epispot/pull/40).

## New Graphs
Epispot Nightly might get some new graphs, and will switch from [matplotlib](https://matplotlib.org) to [plotly](https://pypi.org/project/plotly), with a much better interface. However, it's not final, so don't get too hooked up on this, but we for sure will be getting new graphs in epispot v3.0.

## Other cool projects
Epispot developers are working on epidash, which is a interactive demo for epispot on the web. It's kind of like [covasim's](https://covasim.idmod.org) dashboard, but not for COVID-19, and much more customizable. 
Epispot also got a neat new [manual](https://github.com/epipsot/manual) for a detailed guide on using epispot. The manual can be viewed [here](https://epispot.github.io/manual)
Speaking of documentation, epispot documentation is going to get a overhaul with a new template for [pdoc3](https://pdoc3.github.io) to use. Stay tuned for this, though it will come in a bit.
React Developer – Full-Time, Remote
Tags: hiring
Published: 2021-04-12 18:55:05

***Design your full-time freelance career as a top freelance developer with Toptal.***

Freelance work is defining developer careers in exciting new ways. If you’re passionate about finding rapid career growth potential working with leading Fortune 500 brands and innovative Silicon Valley startups, Toptal could be a great fit for your next career shift. 

Toptal is an elite talent network made up of the world’s top 3% of developers, connecting the best and brightest freelancers with top organizations. Unlike a 9-to-5 job, you’ll choose your own schedule and work from anywhere. **Jobs come to you, so you won’t bid for projects against other developers in a race to the bottom.** Plus, Toptal takes care of all the overhead, empowering you to focus on successful engagements while getting paid on time, at the rate you decide, every time. Our sophisticated screening process makes sure you are provided with top clients without additional overhead, as well as assistance in maximizing the potential of your full-time freelance career. Joining the Toptal network also gives you access to technical training programs, mentors, and coaching programs, so you can connect with a global community of experts like you to share peer-to-peer knowledge and expand your network globally. 

As a freelance developer, you can become a part of an ever-expanding community of experts in over 120 countries, working remotely on projects that meet your career ambitions. 

That’s why the world’s top 3% of developers choose Toptal. Developers in our elite network share:
* English language proficiency
* 3+ years of professional experience  
* Project management skills
* A keen attention to detail
* Experience with system architecture or leading a software team is a strong advantage
* Full-time availability is a strong advantage


If you’re interested in pursuing an engaging career working on full-time freelance jobs for exclusive clients, take the next step by clicking apply and filling out the short form: [https://topt.al/dNcqNK](https://topt.al/dNcqNK)
Popular Conditional Statements Made Simple in Powershell
Published: 2021-04-12 18:48:37

```powershell
# "FOR" Statement
for ($a = 1; $a -le 10; $a++) {$a}

# "DO While" Loop
$a = 1
do {$a; $a++} 
while ($a -lt 10)

# "DO until" Loop
$a = 1
do {$a; $a++} 
until ($a –gt 10)

# "IF" statement
 $a = ""white"" 
 if ($a -eq ""red"") {""The color is red.""} 
 elseif ($a -eq ""white"") {""The color is white.""}  
 else {""The color is blue.""}

# "Select Case" statement
$a = 2
switch ($a) 
 { 1 {""The color is red.""} 
   2 {""The color is blue.""} 
   3 {""The color is green.""} 
   4 {""The color is yellow.""} 
   default {""Other.""}
 }
```
Download Releases from Github using Curl and Wget
Tags: general, curl, download, github
Published: 2021-04-13 22:26:00

---
title: Download Releases from Github using Curl and Wget
published: true
date: 2021-04-12 18:47:12 UTC
tags: General,curl,download,github
canonical_url: https://veducate.co.uk/download-releases-from-github-using-curl-and-wget/?utm_source=rss&utm_medium=rss&utm_campaign=download-releases-from-github-using-curl-and-wget
---

###### The issue

I was trying to download a software release from GitHub using Curl and hitting an issue, the file wasn’t large enough for a start, it was unusable and clearly not the file I expected.

```
curl -O https://github.com/kastenhq/external-tools/releases/download/3.0.12/k10tools_3.0.12_linux_amd64

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 635 100 635 0 0 2387 0 --:--:-- --:--:-- --:--:-- 2387
```

I tested this in a browser and found the link redirects elsewhere, hence the issue.

###### The Fix

Just needed to specify a few extra arguments.

```
curl -LJO https://github.com/kastenhq/external-tools/releases/download/3.0.12/k10tools_3.0.12_linux_amd64

# Explanation of the arguments

-L, --location Follow redirects
-J, --remote-header-name Use the header-provided filename
-O, --remote-name Write output to a file named as the remote file
```

If you wish to use wget instead.

```
wget --content-disposition https://github.com/kastenhq/external-tools/releases/download/3.0.12/k10tools_3.0.12_linux_amd64

# Explanation of the argument 
--content-disposition honor the Content-Disposition header when choosing local file names (EXPERIMENTAL)

```

Regards

[Follow @Saintdle](https://twitter.com/saintdle)<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

[Dean Lewis](https://uk.linkedin.com/in/saintdle?trk=profile-badge)

The post [Download Releases from Github using Curl and Wget](https://veducate.co.uk/download-releases-from-github-using-curl-and-wget/) appeared first on [vEducate.co.uk](https://veducate.co.uk).
Flutter, what is the structure of creating a typical view?
Tags: flutter, help, dart, codereview
Published: 2021-04-12 18:36:48

I'm coming from HTML CSS, 
Material-UI, VUETIFY, SASS and React.

how does Flutters structure differ?
im running into getting messed up on the "children", how to use the "Style" and what widget USES and DOSNT use them. it seems like you just use "style" and you can use typical styles.... but no?
VS Code Shortcut Cheat Sheet🔥 - Productivity boost 🚀
Published: 2021-04-12 18:35:25

Hey Devs, This is a cheat sheet for all the VSCode users out there, these shortcuts can increase your speed and productivity!!

So let's start.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2qvvj5h4vb3fv3n0b20.png) 

### Command palette

| Key   | Description       |
| ----- | ----------------- |
| `⇧⌘P` | Show all commands |
| `⌘P`  | Show files        |

### Sidebars

| Key   | Description    |
| ----- | -------------- |
| `⌘B`  | Toggle sidebar |
| ----  | ----           |
| `⇧⌘E` | Explorer       |
| `⇧⌘F` | Search         |
| `⇧⌘D` | Debug          |
| `⇧⌘X` | Extensions     |
| `⇧^G` | Git (SCM)      |

### Search

| Key   | Description      |
| ----- | ---------------- |
| `⌘F`  | Find             |
| `⌥⌘F` | Replace          |
| ----  | ----             |
| `⇧⌘F` | Find in files    |
| `⇧⌘H` | Replace in files |

### Panel

| Key                        | Description   |
| -------------------------- | ------------- |
| `⌘J`                       | Toggle panel  |
| ----                       | ----          |
| `⇧⌘M`                      | Problems      |
| `⇧⌘U`                      | Output        |
| `⇧⌘Y`                      | Debug console |
| <code>^`</code>            | Terminal      |

### View

| Key      | Description      |
| -------- | ---------------- |
| `⌘k` `z` | Zen mode         |
| ----     | ----             |
| `⌘k` `u` | Close unmodified |
| `⌘k` `w` | Close all        |

### Debug

| Key    | Description             |
| ------ | ----------------------- |
| `F5`   | Start                   |
| `⇧F5`  | Stop                    |
| `⇧⌘F5` | Restart                 |
| ----   | ----                    |
| `^F5`  | Start without debugging |
| ----   | ----                    |
| `F9`   | Toggle breakpoint       |
| ----   | ----                    |
| `F10`  | Step over               |
| `F11`  | Step into               |
| `⇧F11` | Step out                |
| ----   | ----                    |
| `⇧⌘D`  | Debug sidebar           |
| `⇧⌘Y`  | Debug panel             |

## References

* [Keyboard shortcuts (MacOS)](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf)
* [Keyboard shortcuts (Windows)](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf)
* [Keyboard shortcuts (Linux)](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf)
* [DevHints VSCode](https://devhints.io/vscode)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7fbvg1jro6mv355uet9.png) 

---

**PLEASE FOLLOW, LIKE, SHARE, AND COMMENT ANY COMMAND YOU THINK I MISSED OUT!!**

Thanks for reading!

---

## ⚡ Giveaway ⚡
We are giving away any course you need on Udemy. Any price any course.
Steps to enter the giveaway
--> React to this post
--> [Subscribe to our Newsletter](https://worldindev.ck.page/) **<--** Very important

---

Happy Coding.
Get ALL Recent Events with this PowerShell One-Liner
Tags: powershell
Published: 2021-04-12 18:32:37

Get ALL Recent Events with this PS One-Liner

Absolute Dust. Enjoy....

```Powershell
Get-WinEvent -ListLog * -EA silentlycontinue | where-object { $_.recordcount -AND $_.lastwritetime -gt [datetime]::today} | foreach-object { get-winevent -LogName $_.logname -MaxEvents 1 } | sort Timecreated | Format-Table TimeCreated, ID, ProviderName, Message -AutoSize –Wrap 
```
Learn a Random PowerShell Command or Concept Using these two simple commands
Published: 2021-04-12 18:25:40

Learn a Random PowerShell Command or Concept Using these two simple commands

```powershell
Get-Command -Module Microsoft*,Cim*,PS* | Get-Random | Get-Help -ShowWindow

Get-Random -input (Get-Help about*) | Get-Help -ShowWindow"
```
Kotlin – RestTemplateClient Send/Recieve Base64 File/Image to SpringBoot server

Tags: kotlin, springboot, base64, resttemplateclient
Published: 2021-04-12 18:22:30

https://grokonez.com/spring-framework/spring-boot/kotlin-spring-boot/kotlin-resttemplateclient-sendrecieve-base64-fileimage-springboot-server

Kotlin – RestTemplateClient Send/Recieve Base64 File/Image to SpringBoot server

In the tutorial, we guide how to post/get base64 files/images by RestTemplateClient to SpringBoot server with Kotlin language.

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Kotlin 1.2.20
– Spring Tool Suite – Version 3.9.2.RELEASE
– Spring Boot – 1.5.10.RELEASE
– Apache Maven 3.5.2
<h2>II. Goal</h2>
We create 2 Kotlin SpringBoot projects {KotlinRestfulAPIs, KotlinRestTemplateClient} as below:

<img src="https://grokonez.com/wp-content/uploads/2018/02/Kotlin-Springboot-post-get-base64-file-image-with-RestTemplateClient-projects.png" alt="Kotlin Springboot post-get base64 file image with RestTemplateClient - projects" width="632" height="183" class="alignnone size-full wp-image-10921" />

KotlinRestfulAPIs project provides 2 RestAPIs:

<pre><code class="language-java">
@PostMapping(value = "/post")
fun post(@RequestBody image: ImageData): String
...

@GetMapping(value = "/get")
fun get(@RequestParam("name") name: String): ImageData 
...
</code></pre>


More at:

https://grokonez.com/spring-framework/spring-boot/kotlin-spring-boot/kotlin-resttemplateclient-sendrecieve-base64-fileimage-springboot-server
Keycloakify: Create Keycloak themes using React
Tags: security, react, typescript
Published: 2021-04-12 18:16:24

<p align="center">
    <img src="https://user-images.githubusercontent.com/6702424/109387840-eba11f80-7903-11eb-9050-db1dad883f78.png">  
</p>

[Keycloakify](https://github.com/InseeFrLab/keycloakify) is a build tool that aims at making the creation of custom Keycloak themes as straightforward as possible.

Keycloak provides [theme support](https://www.keycloak.org/docs/latest/server_development/#_themes) for web pages. This allows customizing the look and feel of end-user facing pages so they can be integrated with your applications.
It involves, however, a lot of raw JS/CSS/[FTL]() hacking, and bundling the theme is not exactly straightforward.

Beyond that, if you use Keycloak for a specific app you want your login page to be tightly integrated with it.
Ideally, you don't want the user to notice when he is being redirected away. 

Trying to reproduce the look and feel of a specific app in another stack is not an easy task not to mention
the cheer amount of maintenance that it involves.

<p align="center">
    <i>Without keycloakify, users suffers from a harsh context switch, no fronted form pre-validation:</i><br>
    <img src="https://user-images.githubusercontent.com/6702424/108838381-dbbbcf80-75d3-11eb-8ae8-db41563ef9db.gif">
</p>

Wouldn't it be great if we could just design the login and register pages as if they were part of our app?  
Here is `keycloakify` for you 🍸

<p align="center">
    <i> <a href="https://datalab.sspcloud.fr">With keycloakify:</a> </i> 
    <br>
    <img src="https://user-images.githubusercontent.com/6702424/114332075-c5e37900-9b45-11eb-910b-48a05b3d90d9.gif">
</p>  

*NOTE: No autocomplete here just because it was an incognito window.*  

<p align="center">
    <i>Ultimately the build tool Generates a Keycloak theme</i>
    <img src="https://user-images.githubusercontent.com/6702424/110260457-a1c3d380-7fac-11eb-853a-80459b65626b.png">
</p>

If you already have a Keycloak custom theme, it can be easily ported to Keycloakify.


[Checkout Keycloakify here](https://github.com/InseeFrLab/keycloakify)