teleren/devto huggingface dataset:
Automatização de intalações
Tags: coisasquetodomund, dicastech, automatização, chocolatey
Published: 2018-08-13 14:37:42

---
title: Automatização de intalações
published: true
tags: Coisas que todo mund,Dicas tech,automatização,chocolatey
canonical_url: http://blog.paulorobertoelias.com.br/index.php/2018/08/08/automatizacao-de-intalacoes/
---

![](https://blog.especializati.com.br/wp-content/uploads/2017/05/chocolatey.png)

Com o Windows migrando para um formato loja para seus apps, talvez não seja interessante mais para todo tipo de usuário e softwares, a dica que darei hoje. Contudo, muitos aplicativos ainda não são distribuídos por ela, ou talvez jamais cheguem a ser.

E um software que ajuda muito nessa tarefa é o [Chocolatey](https://chocolatey.org/). Trata-se de uma aplicação, conectada a um repositório, onde os usuários criam scripts relacionados aos diretórios de download de diversas ferramentas. Os próprios usuários mantém esses scripts, mas eles passam por uma moderação para tentar evitar arquivos e códigos maliciosos, sendo assim, é possível dizer que instalar aplicações por ele é tão seguro quanto pelo download comum.

Isto posto, desenvolvi um script [Powershell](https://docs.microsoft.com/pt-br/powershell/scripting/getting-started/getting-started-with-windows-powershell?view=powershell-6), que baixa o próprio Chocolatey e o utiliza para instalar silenciosamente, todas as aplicações que uso regularmente:

<script src="https://gist.github.com/PRElias/499c0a30bd42acb10269f403d78188ab.js"></script>

O script acima utiliza o comando upgrade do choco, pois ele instala quando não encontra, ou faz a atualização caso o mesmo já se encontre instalado, ou seja, você pode usar o mesmo script para atualizações futuras.

Se você desejar, pode verificar os softwares disponíveis como pacotes choco, em seu diretório, clicando [aqui](https://chocolatey.org/packages) e customizar meu script como lhe convenha. Neste link você pode também, verificar os detalhes de cada script de instalação, caso queira saber exatamente de onde são baixados os arquivos e todos os comandos.

Basta fazer o download do arquivo (clicando no nome do arquivo na parte de baixo da janela dele no post), ou copiar o seu conteúdo e salvar com a extensão ps1, usada pelo Powershell (você pode clicar no botão “view raw” para ver somente seu conteúdo na tela).

Outra dica relacionada à essa, é o uso de um arquivo para modificação do registro. Com ele, fica disponível no menu de contexto do Windows (botão direito do mouse), a opção para executar um script Powershell diretamente como administrador.

<script src="https://gist.github.com/PRElias/06fabacc05be80a73e799b21581617cc.js"></script>

Basta executar o arquivo (da mesma forma que sugerido para o primeiro arquivo do post) e aceitar a modificação do registro.

Abs.
Custom Handlers for Ruby Gem debug_helper
Tags: ruby, debugging
Published: 2018-08-08 17:30:41

---
title: Custom Handlers for Ruby Gem debug_helper
published: true
description: 
tags: ruby, debugging
---

My Ruby gem [debug_helper](https://rubygems.org/gems/debug_helper) supports printf-style debugging by explicating a given object (sometimes recursively).
The documentation is over at GitHub project [debug_helper](https://github.com/BurdetteLamar/debug_helper).

So far I've implemented handling for many of the more commonly-used classes in the core, and for a few classes in the standard library
Now I'm looking at how to implement a custom handler -- that is, a `FooHandler` class for your very own class `Foo`.

Basically, the custom handler needs to specify which methods to call for the explication, along with any required arguments.

Right now I'm expressing that data as an array of arrays:

    [
      # Method that takes no argument.
      [:foo],
      # Method that takes arguments.
      [:bar, arg0, arg1]
    ]

I'm considering allowing more convenience, which also would add complexity:

    [
      # Method that takes no argument is just a Symbol.
      :foo,
      # Method that takes arguments can be a an Array, as before.
      [:bar, arg0, arg1],
      # Method that takes arguments can be a 1-key Hash (method and arguments).
      :baz => [arg0, arg1],
    ]

Opinions?
dev.to open source help/discussion thread (v0)
Tags: meta
Published: 2018-08-08 17:13:40

---
title: dev.to open source help/discussion thread (v0)
published: true
description: This is the starting point for getting help on any issue relating to working with the dev.to open source project.
tags: meta
---

This is the starting point for getting help on any issue relating to working with the [dev.to open source project](https://github.com/thepracticaldev/dev.to). This thread will act as an FAQ destination of sorts. **Do not feel shy posting here**, we'll continuously keep an eye on this thread and we urge anyone to hop in to help in any way they can. 

We will occasionally start new threads with an updated version number to keep up with the state of the project as things change over time and information in here become out of date.

We plan to eventually use [DEV Connect](/connect) channels as sort of breakout rooms for different parts of the project, but not as one massive room. The specifics of how we’ll leverage Connect rooms is a bit to be determined.

I urge folks involved in the project to hit the save button (🔖) to track discussion in these threads in your [reading list comment activity area](https://dev.to/readinglist?v=comments).

Happy coding ❤️
GSoC 2019
Tags: gsoc2019
Published: 2018-08-08 16:20:09

---
title: GSoC 2019
published: true
description: Want help to get selected in gsoc 2019.
tags: GSoc 2019
---

Hi,

I am Rupesh, an aspiring Full stack web developer. My tech stacks are HTML , CSS, JS, Node.js, Bootstrap, MySql, MongoDB, C, C++. I want to get selected in GSoC 2019 but confused with which organisation to choose ,and get started so that the chances for my selection in gsoc 2019 gets increased ,here is my github profile(https://github.com/Rupeshiya). Please share your experiences and suggest me some organisation to get started. Help needed.
Thanks.
Learning Algorithms with JS, Python and Java 5: FizzBuzz
Tags: algorithms, beginners, learning, javascript
Published: 2018-08-08 15:56:57

---
title: Learning Algorithms with JS, Python and Java 5: FizzBuzz
published: true
description: 
tags: algorithms, beginners, learning, javascript
---

This is the fifth article of my attempts to follow Stephen Grider's [Udemy course](https://www.udemy.com/coding-interview-bootcamp-algorithms-and-data-structure/) in three different languages.

When I wrote [my last post](https://dev.to/tommy3/learning-algorithms-with-js-python-and-java-4-maxchar-1eo2) a couple of days ago, I had only 5 followers, and now I have 35! I also received comments for the first time. I'm so happy I started this series, but now I feel kind of embarrassed to write about so famous a question at this timing.

There must be thousands of solutions, but here I just focus on showing two JS codes and trying to "translate" them into Python and Java as faithfully as possible.

> --- Directions
> Write a program that console logs the numbers
> from 1 to n. But for multiples of three print
> “fizz” instead of the number and for the multiples
> of five print “buzz”. For numbers which are multiples
> of both three and five print “fizzbuzz”.
> --- Example
>   fizzBuzz(5);
>   1
>   2
>   fizz
>   4
>   buzz

## 1. Simple

JavaScript:
```
function fizzBuzz(n) {
    for (let i = 1; i <= n; i++) {
        if (i % 15 === 0) {
            console.log('fizzbuzz');
        } else if (i % 3 === 0) {
            console.log('fizz');
        } else if (i % 5 === 0) {
            console.log('buzz');
        } else {
            console.log(i);
        }
    }
}
```

Python:
```
def fizz_buzz(n):
    for i in range(1, n+1):
        if i % 15 == 0:
            print('fizzbuzz')
        elif i % 3 == 0:
            print('fizz')
        elif i % 5 == 0:
            print('buzz')
        else:
            print(i)
```

Java:
```
public static void fizzBuzz(int n) {
	for (int i = 1; i <= n; i++) {
		if (i % 15 == 0) {
			System.out.println("fizzbuzz");
		} else if (i % 3 == 0) {
			System.out.println("fizz");
		} else if (i % 5 == 0) {
			System.out.println("buzz");
		} else {
			System.out.println(i);
		}
	}
}
```

# 2. More Concise

JavaScript:
```
function fizzBuzz(n) {
    for (let i = 1; i <= n; i++) {
        console.log((i % 3 ? '' : 'fizz')
            + (i % 5 ? '' : 'buzz') || i);
    }
}
```

Python:
```
def fizz_buzz(n):
    for i in range(1, n+1):
        print(('' if i % 3 else 'fizz') +
              ('' if i % 5 else 'buzz') or i)
```

Java:
```
public static void fizzBuzz(int n) {
	for (int i = 1; i <= n; i++) {
		String result = (i % 3 > 0 ? "" : "fizz") 
				+ (i % 5 > 0 ? "" : "buzz");
		if (result.equals("")) {
			result = String.valueOf(i);
		}
		System.out.println(result);
	}
}
```

I'm not really satisfied with the last Java code. I'd love to know if a more literal equivalent is possible. Thank you in advance for your comments!
React Weather App Video Course 6-7
Tags: javascript, react
Published: 2018-08-08 15:48:23

---
title: React Weather App Video Course 6-7
tags: javascript, react
published: true
description: React tutorial for beginners. Making weather app parts 6-7.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ojsoibgy6hwt92m05eq8.jpg
---

Hey friends, I’m super happy that I manage to continue recording those videos and it’s getting easier with each episode! In the beginning I was sooooooo nervous.

If you want to learn how to make a simple weather app with ReactJS - check out those videos:

* [Part 6](https://youtu.be/jiJM18Lc1n8)
* [Part 7](https://youtu.be/3AbzaIl-ojw)
Background image gradient overlay
Tags: css
Published: 2018-08-08 15:38:52

---
title: Background image gradient overlay
published: true
description: Five years ago I made a CodePen to demonstrate how to apply a gradient overlay over a background image. Since then, that pen has been viewed over 294,804 times and hearted 705 times.
tags: css
---
Five years ago I made a [CodePen](https://codepen.io/alexcarpenter/pen/LveDx/) to demonstrate how to apply a gradient overlay over a background image. Since then that pen has been viewed over 294,804 times and hearted 705 times.

Since it still gets referenced daily, I thought I would give it a proper write up.

First lets create our banner element which we will apply our background image and gradient overlay to. We will also add an additional content wrapper for elements that live within our banner, which will reference later.

```html
<div class="banner">
  <div class="banner__content">
    <h1>Banner Heading</h1>
    <p>Banner description</p>
  </div>
</div>
```

Next lets apply our background image to our banner element and set a min-height of 400px.

```css
.banner {
  position: relative;
  width: 100%;
  min-height: 400px;
  background: url('http://unsplash.it/1200x800');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
```

To apply our gradient overlay, will make use of a [pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements). We absolutely position the overlay to cover 100% width and height of our banner.

```css
.banner:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to bottom right, red, blue);
  opacity: 0.6;
}
```

Lastly, lets revisit the banner content wrapper. Since we are applying the gradient overlay with a pseudo-element, you will sometimes run into issues with content inside of the banner displaying underneath the gradient overlay. To fix this we wrap all of our content inside of our banner with a wrapper and set that to recieve a `z-index` higher than the overlay as seen below.

```css
.banner__content {
  position: relative;
  z-index: 10;
}
```

As noted in the first comment, you could omit the pseudo-element and make use of multiple backgrounds. This works great as well, but removes the ability to animate the gradient on hover which can be a common use case.

{% codepen https://codepen.io/alexcarpenter/pen/LveDx/ %}

View the original [CodePen](https://codepen.io/alexcarpenter/pen/LveDx/).
Fenix: A new mobile browser from Mozilla
Tags: mobile, android, java, webdev
Published: 2018-08-08 14:14:03

---
title: Fenix: A new mobile browser from Mozilla
published: true
description: 
tags: mobile, android, java, webdev
---
## About the Project
Mozilla recently created a Github repository for a brand new mobile web browser named Fenix. Not much is known about this project. There has been no official statement from Mozilla at this time. A source close to the projects expects a usable project to land somewhere in 2019. With the current rate of code pumping out of the project I would expect that if not earlier. Sebastian Kaspari seems to be the lead developer with most of the commit history.

### Technical Details

### GeckoView

Fenix opts to use Mozilla's own GeckoView, rather than the default android webview. Geckos wiki mentions it is not quite ready for production, which leads me to believe a lot of the work going into GeckoView is specifically for Fenix. You can try out GeckoView by following the steps [here](https://wiki.mozilla.org/Mobile/GeckoView#What_is_GeckoView)

### Nightly track on its way

Seven days ago, project lead Sebastian created an issue to set up a testing track on google play. This will allow developers and early adopters to get the first look at Fenix, and how it stacks up to other modern browsers.

### Docker Build File

The project recently added a Dockerfile that builds all releases of the APK. The Docker project uses the same build chain, which makes it very simple for devs to help contribute to the project. All you need is docker and the other build dependencies are handled within the Dockerfile. This is a great Docker use case that more projects should be taking advantage of

### Mozilla Public License V2

The project currently is Licensed as open source, under the Mozilla Public License Version 2

### Testing

All of my test builds would not install on both physical Android devices, as well as device emulators. If you are able to get a build working on a certain version of android please email me at justyn@nextwavesolutions.io so that I can share images with how the current state of the browser looks. Until then I will be awaiting the testing branch to be deployed on the Play Store.

### No IOS

It's interesting to notice that there is only an Android version of this browser. That is not to say development won't happen for IOS devices.

### Contributing

Recently Ryan Sipes asked for clarification on build instructions to help contribute to the project. If you take a look at issue #55, you will see Sebastian recommend contributing to Mozilla mobiles android-components library. That is where a lot of the tools being used by Fenix are hosted. The third comment on issue #55 is a post written by myself detailing how to use Docker to build the apk's. Here you will find instructions on how to build and retrieve the proper APK.

Read More ... http://nextwavesolutions.io/post/fenix/
Does your laptop stay at work?
Tags: discuss, laptop, worklife
Published: 2018-08-08 13:28:13

---
title: Does your laptop stay at work?    
published: true
description: discussion on work laptop usage 
tags: discussion,laptop,worklife     
---
Do you bring your work laptop home with you at the end of the day?

I would like to know how the rest of the community works. At my previous position, the laptop were locked to the desk. You had the key, but it was a bit of a bother to unlock and bring it home with you. If you needed to log in, there was a VPN for that. My current office has a lot more flexibility, and it seems like it is the habit of most everyone to bring their laptops with them. I actually feel weird the few times I have left it in office. I have started bringing it home with me more often then not, but really don't use it.

What's the culture at your workplace?
exercism.io looking for mentors
Tags: programming, mentorship, craft
Published: 2018-08-08 12:59:23

---
title: exercism.io looking for mentors
published: true
description: 
tags: programming, mentorship, craft
---

Hello, dev.to'ers.  exercism.io -- "an online platform designed to help you improve your coding skills through practice and mentorship" is looking for mentors!  If you're looking to learn by teaching or just want to pay-it-forward by volunteering to an awesome effort to get others up and running in the language of their choice, this is a great place to start.  I've been using their site since their launch to practice programming problems in different languages, and have recently started mentoring others in those same exercises.  If you're interested in mentoring, check out: https://exercism.io/mentoring-faqs or if you just want to practice coding, and get feedback on your work: https://exercism.io

Currently, the PHP track needs some mentors (and I know there are a few of you out there who enjoy PHP, as I do) but there are lots of different language tracks to choose from!  

Come help us out!
How have you fund an open-source project ?
Tags: discuss, opensource
Published: 2018-08-08 09:18:12

---
title: How have you fund an open-source project ?
published: true
description: Open-source project are now at the heart of the industry, but how do you eat at the end of the day ?
tags: discuss, opensource, 
---

There's so many ways to fund an open-source project these days.

Should small project stay in your spare times and don't bother to be funded ?
Should you engage user and ask for small donation (donation, patreon ...) ?
Should you seek larger company and offer visibility for sponsorship ?
Should a project fund itself by its own financial choice (subscription, paid plan ...) ?

If you've gone thought it yourself or witness a great way to manage it, please share how it goes.
Swift Tip: Initializing & configuring properties
Tags: swift, xcode, ios, development
Published: 2018-08-08 08:51:39

---
title: Swift Tip: Initializing & configuring properties
published: true
description: Different ways to initialize your object's properties and configure them.
tags: swift, xcode, ios, development
---

__This article is also published [on my blog](https://blg.zdnkt.com/swift-tip-initializing-configuring-properties/).__

Sometimes, you need to do more than just assign a value to a property on initialization.

```swift
class Foo {
    let formatter = DateFormatter()
}
```

You might need to configure some of the properties. The first thing that comes to your mind is probably doing it in an initializer.

```swift
class Foo {
    let formatter = DateFormatter()
    
    init() {
        formatter.dateStyle = .short
    }
}
```

There are more ways how to configure your properties without putting the code in the initializer.


```swift
class Foo {
    let formatter: DateFormatter = {
        $0.dateStyle = .short
        return $0
    }(DateFormatter())
}
```

In the example above, you can see that the property `Foo.formatter` is constructed with a closure which takes the instance of `DateFormatter` as a parameter. You can do the same with initializing the `DateFormatter` directly in the closure:


```swift
class Foo {
    let formatter: DateFormatter = {
        let formatter = DateFormatter()
        formatter.dateStyle = .short
        return formatter
    }()
}
```


You can also use a function or a static method to construct the property.

```swift
func dateFormatter() -> DateFormatter {
    let formatter = DateFormatter()
    formatter.dateStyle = .short
    return formatter
}

class Foo {
    let formatter: DateFormatter = dateFormatter()
}
```

```swift
class Foo {
    let formatter: DateFormatter = Foo.dateFormatter()
    
    static func dateFormatter() -> DateFormatter {
        let formatter = DateFormatter()
        formatter.dateStyle = .short
        return formatter
    }
}
```

All these options work for local variables too.

Get in touch on [Twitter @zdnkt](https://twitter.com/zdnkt) for comments, discussion feedback or ideas!

__This article is also published [on my blog](https://blg.zdnkt.com/swift-tip-initializing-configuring-properties/).__
AWS Certified Solutions Architect
Tags: amazon, aws, ec2, linux
Published: 2023-04-29 21:21:56

---
title: AWS Certified Solutions Architect
published: true
date: 2018-08-08 07:11:51 UTC
tags: amazon,aws,ec2,linux
canonical_url: https://mikestaszel.com/2018/08/08/aws-certified-solutions-architect/
---

Quick post – I’ve been busy studying for the [AWS Certified Solutions Architect](https://aws.amazon.com/certification/certified-solutions-architect-associate/) – Associate exam for the past few weeks – good news, I passed it a few days ago! Shoot me a note if you ever need some solutions architected.

I primarily did this because I’ve been using AWS for years now – but so has everyone else – this would be a differentiator. There was also a lot missing in-between the cracks (I learned how to give instances in a private subnet Internet access to install/update software without giving them public IP addresses and without spending hours reading Stack Overflow posts).

<!--more-->

Resources I used:

- [Linux Academy](https://linuxacademy.com/amazon-web-services/training/course/name/aws-certified-solutions-architect-associate) course. Really great, engaging course. They have labs where you set all this stuff up yourself!
- [The Orion Papers](https://labfiles.linuxacademy.com/aws-csa/orionpapers.html). Great resource put together by Linux Academy.
- [QwikLabs](https://aws.qwiklab.com/) practice labs. I did a bunch of the free ones.
- [This practice exam](https://www.simplilearn.com/aws-solutions-architect-exam-free-practice-test) from Simplilearn.

Some notes:

- Know VPCs, subnets, and how to do everything related to them. I’d say almost half of the exam was about networking of some sort.
- More Route53 questions than I expected. Know how Route53 interfaces with other AWS services like ELB and such.
- Flag questions and come back to them. Some tricky questions about routing traffic between subnets tripped me up.
- Know about DynamoDB, Cassandra, MySQL, Aurora, and ElastiCache – probably forgetting some.

Good luck with studying!

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