teleren/devto huggingface dataset:
Tutorial: Running Selenium in the cloud on a daily cron schedule
Tags: Selenium, tutorial, beginners, python
Published: 2020-05-04 13:36:46

---
title: "Tutorial: Running Selenium in the cloud on a daily cron schedule"
canonical_url: https://wayscript.com/learn/running-selenium-cloud-daily-cron-schedule
---

*Start your Monday off with a super short tutorial using Selenium on [WayScript](https://wayscript.com/). Questions about WayScript? Check out our [FAQ](https://wayscript.com/faq).*

##Introduction
Selenium is a library for automating web browser tasks. With WayScript, you can run selenium code on the cloud on an automated schedule without needing to set up a server or any other infrastructure.

##Setting up your Cron Scheduler
Under triggers, select the [Time Trigger](https://docs.wayscript.com/library/triggers/time-trigger).

![time trigger](https://cdn.wayscript.com/blog_img/43/time_trigger.png)

Next, set the cadence and time that you want your script to run at (ex. every day at 9am, or once a week on Thursdays, etc.).

![trigger mod](https://cdn.wayscript.com/blog_img/43/time_trigger_mod.png)

##Setting up your Python Script
Drag the [Python Module](https://docs.wayscript.com/library/modules/python) into your WayScript flow

![mod](https://cdn.wayscript.com/blog_img/43/python_module.png)

##Setup your Selenium Headless Browser
```python
from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
​
browser = webdriver.Chrome(options = options)
browser.set_page_load_timeout(10)
​
browser.get('https://wayscript.com/')
​
ps = browser.page_source
print(ps)
​
browser.close()
```

##All done! Now your selenium code will run
You can also [output data from Python](https://docs.wayscript.com/library/modules/python#outputs) to use in other modules such as sending emails, slack messages, etc.
Introducing Micro Server
Tags: programming, cloud, go
Published: 2020-05-04 13:30:38

---
title: Introducing Micro Server
published: true
description: A distributed systems runtime for the Cloud and beyond
tags: programming, cloud, golang
---

New post: Introducing the Micro Server. A distributed systems runtime for the Cloud and beyond. https://micro.mu/blog/2020/05/04/introducing-micro-server.html #microservices #golang #cloud #kubernetes
Vim 101: Basics of the Vim Text Editor
Tags: vim, introduction
Published: 2020-05-04 13:18:25

{% youtube zxdQJlB65lA %}

At the Frederick Open Source meetup this month, I talked about the Vim text editor.  I covered a lot of the fundamentals, including a mental framework to help demystify why Vim is challenging to so many people.  I also covered some tips that people can use to work toward Vim mastery.

The recording from the talk is available on YouTube.  [Check it out!](https://www.youtube.com/embed/zxdQJlB65lA)
useFirebase() with Vue3 and Vite
Tags: javascript, webdev, vue, firebase
Published: 2020-05-04 13:14:22

---
title: useFirebase() with Vue3 and Vite
published: true
description: My first attempt to build a plugin for vue3
tags: #javascript #webdev #vue #firebase
---

Last Friday I discovered that Evan You haven't slept and produced a new amazing tool - [vite](https://github.com/vuejs/vite) which starts a local dev server in less than a second! What a miracle! I think this is a beginning of the end of the Webpack era, where you had to wait around one minute just to kick-start a new project!

I started playing around with vue-composition-api already for a while with Nuxt.js and Firebase and came up with some wrappers to trigger auth and access collections. I thought it would be a good start for my first open source project - firebase plugin for vue3 - [vca-firebase](https://github.com/razbakov/vca-firebase)

Here is how you can use it:

```html
<template>
  <div>UID: {{ uid }}</div>
  <pre>{{ accounts }}</pre>
  <button @click="signInWithGoogle">Sign In with Google</button>
  <button @click="createAccount({ name: 'Join' })">Add</button>
</template>

<script>
  import { initFirebase, useAuth, useCollection, useDoc } from "vca-firebase";
  import firebaseConfig from "./firebase.config.js";

  export default {
    setup() {
      initFirebase(firebaseConfig);

      const { uid, signInWithGoogle } = useAuth();
      const { docs: accounts } = useCollection("accounts");
      const { create: createAccount } = useDoc("accounts");

      return {
        signInWithGoogle,
        uid,
        accounts,
        createAccount,
      };
    },
  };
</script>
```

You need just to `initFirebase` once, which will trigger `provide` method and create a `Symbol()`, which you will `inject` with use-methods anywhere in the app. You might want to see [source code](https://github.com/razbakov/vca-firebase) to have an idea how to create your own plugin.

Collection will be initialised only once and listener will update a state object with any changes made to documents in those collections.

Please let me know if it works for you and [support me with a star to my repo](https://github.com/razbakov/vca-firebase). Feel free to open issues with bug reports and feature requests.
My Web Development Journey
Tags: beginners, career
Published: 2020-05-04 03:01:00

# Introduction

We all have to start somewhere and not knowing everything is okay. With the right amount of discipline anything is achievable.

## How I went from customer service representative to Front End Web Developer in 5 months

I graduated from university in 2015 with a degree in Animation and Graphic Design, I then spent 4 years after university focusing on 3D art while working in customer service. When I started to not enjoy that, I picked up web development and haven't looked back.

### Not feeling good enough to make it as a Developer

In 2018 I learnt HTML and CSS and I remember naively thinking it was enough to get a job... and luckily I had scored a freelancing gig. I definitely struggled to get anything more than that which was discouraging and led to a 6month hiatus. 

I came back to dev in August 2019 and I would stay up super late learning JavaScript and improving the skills I had already learned. I would then read https://eloquentjavascript.net/ on my lunch break and sometimes take my laptop to do https://edabit.com/ **(I feel like this site had helped me the most)**

As soon as I felt confident in my JS skills, I started learning React and felt as ready as I could be to get a job.

### How I scored my first Web Developer Job

I was applying non-stop, I would get calls from recruiters to only be told I am lacking experience no matter how hard I showed I was hungry for knowledge and extremely dedicated.

I then had this idea of cold emailing local companies / studios and it went like this:

"Hello, My name is Chantel and I am reaching out to see if there are any junior positions in Frontend web development going at your company.

I currently freelance web development and design while working a casual role in customer service at EB Games. In my downtime, I work towards increasing my skillset, designing web mockups and completing personal projects, web dev projects with friends.

I'd love to meet face to face and tell you why I would be a great asset for your company.

In the meantime, you can check out my portfolio - https://chantelsky.netlify.com"

And it actually worked, crazy right?!
I implore you to give this a go, you never know where you might end up.

Although I was not in that position for very long, as a few weeks later I was employed full-time as a Developer which has then lead me to an even bigger and better position elsewhere.

### conclusion

I hope this has been inspiring and useful to you on your own developer journey. Always be persistent and the willingness to work hard and learn as much as you can.

Believe in yourself and don't give up!

## And of course other resources that have helped me immensely as a developer

* https://www.freecodecamp.org/
* Free JS course at Udacity - https://www.udacity.com/course/es6-javascript-improved--ud356#_=_
* Advanced CSS, Sass etc https://www.udemy.com/share/101WkwBUQScVxSQ3Q=/
* Zero to Mastery - https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/
List all posts using 11ty
Tags: javascript, webdev, eleventy, 11ty
Published: 2020-05-04 13:08:34

On the front page of a blog, we often list the title of every post on the site. Jekyll will automatically list all pages within the `_post` directory under one collection. 11ty, however, creates collections based on the tags. In other words, the only way to tell 11ty that your page is a blog post is by adding an extra tag. You may not want to add the same tag for every post, especially if you already categorize your posts.

One ~~workaround~~ _fully documented feature_ is to create a custom collection. In `.eleventy.js`, use the `addCollection` method to define a new collection. You can call it _posts_, if you want to (you can also call it _ice_cream_). Use [glob syntax](https://github.com/isaacs/node-glob) to get only the pages inside your post folder. You can now find all your blog posts with the `collections.posts` variable.

Here's the code for your `.eleventy.js` file.
```js
module.exports = function(eleventyConfig) {
    
    eleventyConfig.addCollection("posts", function(collection) {
        return collection.getFilteredByGlob("posts/**/*.md");
    });

}
```
Make your computer move from A to B in javaScript (Whilst also avoiding walls!)
Tags: pacman, javascript
Published: 2020-05-04 12:25:20

This tutorial is useful for so many games, but I am going to show you how to do this using PacMan as an example. For those of you who watched my PacMan Game Walkthrough, you will know that in the game all the ghosts have random movements. They do not really 'chase' PacMan around the board. Hopefully, after watching this video, you will be able to implement some smart ghost movement logic into your game, resulting in each ghost chasing PacMan.  

Watch the video here > https://youtu.be/Rr2xCoOm5BM

{% youtube Rr2xCoOm5BM %}

I would love to see what you made so please tag me on twitter on @ania_kubow or mention me on Youtube so I can find it and see :)
Push Notification Using FCM (Firebase Cloud Messaging)
Tags: codepen, productivity
Published: 2020-05-04 12:22:30

A Notification is required in our daily routine life. Moreover, getting it from a mobile device is also required in today’s busy life. There are two types of such notifications.

<h2>Push Notification Using FCM</h2>
Local notification: These are the notifications which can be run locally from your mobile device only. Mainly when your application is running in front, that time these notifications are used.
Push notifications: These are the notifications which are called from the server even if your application is not running.
Using push notifications we can achieve many things like live score, events, news etc

<h2>Push Notifications:</h2>

Push notifications is same as SMS text messages and mobile alerts, these messages and notifications can get by users who have installed the respective application in their mobile these can be used as reminder and notifications about the new thing in an application.

Let’s talk about how to integrate this very useful feature in ionic. There are certain prerequisites that need to be fulfilled before moving ahead.

Need for Push Notification 

FCM Account
Sender Id 
App Id 
PhoneGap Push Plugin
Above mentioned first 3 requisites can get from the FCM. It is the service provided by google for sending messages to the mobile devices.

Configure FCM

<h3>Steps:</h3>

Go to Google FCM (Firebase Cloud Message) https://console.firebase.google.com  
Create New Project 
Goto Project Setting > Cloud Messaging   
Copy Sender Id and ServerKey 
Configure Ionic

We will be going to use ionic IO for this article for showing push notification in action. For that, you will need to have an account on ionic io. Don’t worry it's free. You can create a free account on it and follow the below-mentioned steps for creating an application and getting appid and server key for push notifications.
    
<h3>Steps:</h3>

$ Ionic io init  Enter credentials of https://apps.ionic.io/ ( this will create your application in ionic io )
Go to the apps.ionic.io there you can see the application already created and from there you can get appid; from there go to setting and configure server Key
Go to Setting >  Certificates > New Security Profile Create new Profile  
Edit app select Android/ IOS
Add  Server key from FCM and Save  
Plugin Installation

Now let’s add push notification plugin in our application using below command:

$ cordova plugin add phonegap-plugin-push --variable SENDER_ID=12341234 --save

$ npm install --save @ionic-native/push

Here, Set Sender Id Variable from FCM (Firebase Cloud Message) and it will configure the id in config.xml file 

Read Complete article at - https://addwebsolution.com/blog/push-notification-using-fcm-firebase-cloud-messaging
VimTrick: Text case coercion
Tags: vim
Published: 2020-05-04 12:22:22

Tim Pope's [Abolish vim plugin](https://github.com/tpope/vim-abolish) provides handy options to coerce strings between a variety of casing, naming, or textual conventions, each with 3 simple keystrokes. For example, an underscored string like employee_name can become `EmployeeName `by simply typing `crm`.

In the chart below, the three keystrokes indicated between the square brackets can coerce a string like `SomeLongIdentifier` to the result provided:

* `[crs] some_long_identifier`
* `[crm] SomeLongIdentifier`
* `[crc] someLongIdentifier`
* `[cru] SOME_LONG_IDENTIFIER`
* `[cr-] some-long-identifier`
* `[cr.] some.long.identifier`
* `[cr ] some long identifier`
* `[crt] Some Long Identifier`

We have a short screencast demo and more details on how to use the really useful feature of Abolish [over on VimTricks](https://vimtricks.substack.com/p/vimtrick-text-case-coercion).
A walkthrough of Laravel Backup Server
Tags: php, laravel
Published: 2020-05-04 12:17:25

In this stream (which is the first I've ever done) I'll show you what you can do with our upcoming [laravel-backup-server](https://docs.spatie.be/laravel-backup-server) package and how it works under the hood.

{% youtube ejS84jFFUUE %}
Daily Developer Jokes - Monday, May 4, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-05-04 12:00:15

---
title: "Daily Developer Jokes - Monday, May 4, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20May%204%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259d54c109.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q___: Did you here about the witch who was off by two when casting a hex?

___A___: They failed to make the target DEAD and made them DEAF instead!
 -->
May 4 — Daily CodeNewbie Check-in Thread
Tags: codenewbie, checkin, beginners, discuss
Published: 2020-05-04 11:59:56

---
title: May 4 — Daily CodeNewbie Check-in Thread
published: true
description: A daily thread to ask questions, share progress, and stay accountable!
tags: codenewbie, checkin, beginners, discuss
series: Daily Checkin
---

You are encouraged to use this daily thread to:
- Ask for help (all questions encouraged)
- Explore topics you’re curious about
- Share something you’ve written or read
- Celebrate your wins
- Stay accountable to your goals
- Support your fellow programmers

Happy Coding!

---

_Interested in joining the twice-weekly live [#CodeNewbie Twitter chats](https://twitter.com/search?q=codenewbie)?  You can find us [on Twitter](https://twitter.com/search?q=codenewbie) each Wednesday at 9pm ET (1am GMT on Thursday) and Sunday at 2pm ET (6pm GMT)!_
Enhancing commands with FZF
Published: 2020-05-05 14:14:53

---
title: Enhancing commands with FZF
published: true
date: 2020-05-04 11:36:00 UTC
tags: 
canonical_url: https://coderamblings.dev/posts/enhancing-commands-with-fzf/
---

I spent a lot of time on optimizing the commands that I use on a daily basis. I keep all of these in a [dotfiles](https://github.com/jkaan/dotfiles) repository.

There is one tool that I’ve been incorporating little by little into my daily flow, which is called FZF.[FZF](https://github.com/junegunn/fzf) is a command-line fuzzy finder. In itself that might not be too useful, but combined with other commands is where it truly shines. The repository itself has a lot of [examples](https://github.com/junegunn/fzf#examples) on how to achieve various things with it.

One common pattern I’ve seen in using FZF to enhance commands is, that there are a lot of commands which normally accept one or more argument in terms of a filename. Think of `rm` for example. This command does nothing but print the manual if you execute it without any commands.

Given that, we can create a simple function which will execute FZF to find the file that you want to delete whenever we execute `rm` without any arguments. Executing rm with any arguments will still function the same.

Lets dive into the code for this.

```
function rm {
  if [["$#" -eq 0]]; then
    local files
    files=$(ls | fzf --multi)
    echo $files | xargs rm
  else
    command rm "$@"
  fi
}
```

This command checks the amount of arguments to see if they are equal to zero. If they are not, we issue the normal command, we use `command rm "$@"` here otherwise it would recursively call this function.

If there are zero arguments however we do a few things:

1. Create a variable which gets the list of files that we select with FZF.
2. We pass the —multi option to FZF so that we can select multiple options. Selecting/deselecting is done by pressing Tab and moving around the list of items is done by using the arrow keys. Enter will save the selection and exit FZF.
3. These selected files will be passed to the rm command.

Currently it would only look for the files which are one layer deep, since I’ve used `ls | fzf --multi` here. I’m just piping the output of `ls` into FZF to do a fuzzy search on.

If you want to search for all files recursively, `fzf --multi` without `ls` will do exactly that.

This pattern can be applied to any command that does nothing when used without any arguments, but will execute the command when passed in some arguments. The benefit here is that you won’t have to learn any new commands since it’ll just use the same name as the command you are already using.
A One-Minute Primer on the JavaScript Array Map, Filter, and Reduce Methods
Tags: javascript, webdev, tutorial, begineer
Published: 2020-05-04 11:28:30

---
title: A One-Minute Primer on the JavaScript Array Map, Filter, and Reduce Methods
published: true
description: Learn map, filter, and reduce in a minute!
tags: javascript, webdev, tutorial, begineer
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ust69481dr8e4s33o4ff.jpg
---

Map, Filter, and Reduce are powerful array methods that are definitely worth learning! This is a super-quick primer on each method.

**map:** return array where each element is transformed as specified by the function

```javascript
const arr = [1, 2, 3, 4, 5, 6];
const mapped = arr.map(el => el + 20);
console.log(mapped);
// [21, 22, 23, 24, 25, 26]
```

**filter:** return array of elements where the function returns true

```javascript
const arr = [1, 2, 3, 4, 5, 6];
const filtered = arr.filter(el => el === 2 || el === 4);
console.log(filtered);
// [2, 4]
```

**reduce:** accumulate values as specified in function

```javascript
const arr = [1, 2, 3, 4, 5, 6];
const reduced = arr.reduce((total, current) => total + current, 0);
console.log(reduced);
// 21
```

## More arguments

Note that this is the most basic use of the `map`, `filter`, and `reduce` methods and the functions passed to them can take additional arguments. In other words, please treat this post as a basic introduction!

# Learn More

I put out free email newsletters with JavaScript tips on a weekly basis and would love to put some in your inbox! [Sign up here](https://buttondown.email/typeofnan).
Trying to Find My Place in this Coding Journey
Tags: frontend, html, css, javascript
Published: 2020-05-04 11:06:40

Hi, my name is Mike. I'm a front-end dev. Or so I think. I'm not really into titles or names, but I guess what I do would fall into these terms. Recently, I've been struggling trying to find some path towards reaching my goal, of what I would consider, to be a competent front-end developer.

What do I mean by competent? I just would like to be at a place where I wasn't asking for help with the very basics of development. You see, I am an older guy and started development only a few years ago. I had dabbled in coding in community college back in 2007, but I got sick and left it on the back burner until a few years ago.

I started out in 2017 with a new laptop and a lot of energy. I wanted to build things. I was into the front-end of web dev because I liked the idea of being able to create something that the user could see. Plus the technical side of back-end scares the pants off of me. Anyway, 3 years have gone by and I feel like I have little to show for it. Sure I've built some projects. But, I'm never quite happy with the results and I'm almost always building these projects at a very slow pace.

Therein lies the rub. I do not have the technical abilities to learn superfast. Is that a copout? I do not know. So far I feel like I have a pretty good grasp of HTML5 (although I am learning new stuff everyday), a competency in basic CSS (although I must say flexbox and grid are my mortal enemies), and a basic idea of JavaScript (that's where I need to spend more time training).

I also work with Bootstrap4 and jQuery. I kind of like that because it takes some of the guess work out of things for me. My question is, "Is that cheating?" I really like using Bootstrap because its pretty easy to use (for the most part) and you can get a lot done rather quickly. So, back to my question. Does something that helps me get work done faster actually tie my hands in getting closer to my goals of becoming a competent front-end developer?

I'm kind of wondering this because as I have taken the time to learn Bootstrap4 and jQuery, have I done myself a disservice in not diving too deep into JavaScript? It just seems to me that JavaScript is kind of hard. I've been reading books, and have a few Udemy courses, but I cannot seem to get to a point where I understand things past a rudimentary level. 

I guess the one thing I can take out of all this is I need to practice, but also I need guidance and a good solid pathway to leaning the basics well. If any one has any resources or ideas to share please let me know in the comments. Thanks.