teleren/devto huggingface dataset:
Local aliases using zen aliases
Tags: cmdline, zsh, productivity
Published: 2021-02-05 19:36:08

We can configure aliases very easily in bash or zsh. but those aliases are global to all directory. sometimes we need aliases or commands only for some directories alone. this plugin makes the process easy. those aliases will be available only to that particular directory. aliases will be loaded when you `cd` into the directory and unloaded once you leave the directory. 

<be>

------------

### Configure in zsh

clone plugin from github
```bash
git clone https://github.com/Gokuldroid/zen-alias ~/.oh-my-zsh/plugins/zen-alias
```

check if the plugin is cloned correctly

```bash
ls ~/.oh-my-zsh/plugins
```

open .zshrc

```bash
open ~/.zshrc
```
or

```bash
vim ~/.zshrc
```

add zen-alias like this

```bash
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
    git
    zen-alias
)
```

updating the plugin
```bash
cd <cloned directory> && git pull
```
<br>

-----

### Configure in bash

copy the file to root directory or somewhere in your system.
```bash
curl -S https://raw.githubusercontent.com/Gokuldroid/zen-alias/main/zen-alias.plugin.zsh > ~/.zen-alias.bash
```

source the file in bashrc
```bash
open ~/.bashrc
```

add this line at the end of the bashrc
```bash
source ~/.zen-alias.bash
```
<br>

-----

### Aliases syntax


Create *.aliases* file in the root directory of the project. add your per project aliases like this. You can find a sample file [here](https://github.com/Gokuldroid/zen-alias/blob/main/.aliases).

```
yc: yarn w @zen-alias/client
ys: yarn w @zen-alias/server
ycommon: yarn w @zen-alias/common
ybg: yarn w @zen-alias/bg-jobs
yb: yarn build
yw: yarn watch
```
<br>

----

### Tips

#### Excluding the .aliases file in git tree

incase if you don't want others to use your aliases, you can add it global .gitignore or project .gitignore

```bash
cd ~
touch .gitignore_global
git config --global core.excludesfile ~/.gitignore_global
echo ".aliases" > ~/.gitignore_global
```

<br>

#### Init command for a directory.

we might want to execute some script as soon as we enter the project. like updating local branch or setting up nvm or rvm version etc. zen-alias provides an easy way for this.

define a zen-alias like this,
```bash
init_zen_dir: nvm use && rvm use
```
How do you stay motivated?
Tags: discuss, watercooler, career, feels
Published: 2021-02-05 19:15:14

---
title: How do you stay motivated?
published: true
description: How do I keep motivated to actually go out and do it?
tags: discuss, watercooler, career, feels
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/35r0lslmqdudb3iiw2v2.jpg
---

*cover image by [Jakub Fryš](https://commons.wikimedia.org/w/index.php?curid=78701870)*

This week, I just didn't have the energy. I was trying to learn about [data pipelines](https://thenewstack.io/part-1-the-evolution-of-data-pipeline-architecture/) but the idea of putting into practice made me tired.

I'm curious how *you* stay motivated throughout the week? What gets you out of bed and keeps you moving?
Laravel InertiaJS Pagination
Tags: laravel, vue, php, javascript
Published: 2021-02-05 19:04:13

I was looking for the proper way to do pagination on Inertia JS official documentation website. Unfortunately, there is still no such related content available yet.

However, when wandering around InertiaJS Github profile, I noticed a somewhat official (as the code was found inside a repo of InertiaJS) solution.

[Read More](https://luiyongsheng.medium.com/laravel-inertiajs-pagination-f490afeb5033)
Object.entries is awesome
Tags: javascript, todayilearned
Published: 2021-02-05 19:01:25

Somebody asks you to loop through the properties of an object, most of us will reach for Object.keys right?
```ts
Object.keys(obj).forEach(key => {
  const value = obj[key];
  // do something
})
```

Somebody asks you to map the properties of an object to other values. Object.keys to the rescue again right?
```ts
const newObj = {};
Object.keys(obj).forEach(key => {
  newObj[key] = fn(obj[key]);
});
```

Wait, no reduce? That's so 2018! Let's be needlessly functional:
```ts
const newObj = Object.keys(obj).reduce((acc, key) => {
  return {
    ...acc,
    [key]: fn(obj[key])
}, {});
```
Nice!

Thing is, Object.entries and Object.fromEntries are now widely supported. You can now achieve the same thing like this:
```ts
const newObj = Object.fromEntries(
  Object.entries(obj).map([key, value]) => {
    return [key, fn(value)];
  })
);
```

It's also trivial to just make a utility function that combines the fromEntries and entries calls:

```ts
const mapEntries = (obj, fn) => Object.fromEntries(
  Object.entries(obj).map(fn)
);
```

you could then write the above like this:
```ts
const newObj = mapEntries(obj, ([key, value]) => [key, fn(value)]);
```

I love how simple this is, and you can do so much stuff that's always been a bit of a pain before.

Want to transform keys?
```ts
const newObj = mapEntries(obj, [key, value]) => [fn(key), value]);
```

Want to invert an object?

```ts
const inverted = mapEntries(obj, ([key, value]) => [value, key]);
```

Want to filter properties out of an object?
```ts
const filtered = Object.fromEntries(
  Object.entries(obj).filter(([ , value]) => {
    return value === true;
  })
);
```

Object.entries is awesome, have a play with it.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-02-05 18:54:20

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Happy Friday!


**Looking back on your week — what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Landing a new job
- Cleaning off your desk... or whatever else might spark joy ❤️ 

---

Happy End-Of-Week!

![Friday Dawg](https://media.giphy.com/media/E007jqNIZ8wSZ8QAHK/giphy.gif)
Spotify Integrations with the Fediverse [How-To]
Published: 2021-02-05 18:53:55

Want your friends to know what you are listening to? Using Mastodon, Misskey, or Plemora WHILE syncing with Twitter? This is how!

Links:
https://misskey.io/notes/8hus04djg3
https://zapier.com/apps/spotify/integrations/twitter
https://crossposter.masto.donte.com.br/

To get started, visit https://twitter.com and create a dedicated account.

Next, visit the Zapier link. Connect your Spotify to the dedicated Twitter however you'd like, and of course, you can easily configure it.

Next, you'll either want Twitter Developer access **OR** you can use something else.

**If you have access**
Run these commands in your CLI. Runs best on macOS and Linux.
```
git clone https://github.com/qd-w/fedi-spotify
cd fedi-spotify
npm install
nano spotify.edn
```
Then, configure spotify.edn to have your access tokens. You'll need to create them on both ends, oh, and also, change the APi point.

**If you don't have access**
Visit the Crossposter link from above. Configure it to mirror Twitter to Mastodon.

**Still confused?**
Read the Misskey.io post above for more help. You can also ask for help in the comments.
Assigning new contributors to issues using GitHub Actions
Tags: github, devops, githubactions
Published: 2021-02-05 18:29:30

---
series: [28-github-actions]
---
When most folks consider GitHub Actions, they continuous integration or continuous delivery, a portion of the Actions I use in my workflows focus on the webhook events related to issue comments. 

Now and again, I get a user interested in contributing to my projects, and I'm always looking to make sure every contributor can have a tremendous first contributor experience.

There have been times when my project gets more attention than normal, and I'll have multiple users trying to contribute to the same issue. So to prevent this, I provide context and steps for contributing inside my [CONTRIBUTING.MD](https://github.com/open-sauced/open-sauced/blob/main/CONTRIBUTING.md). Inside this doc, there are detailed instructions on how to take an issue and claim it. 

```yml
// https://github.com/open-sauced/open-sauced/blob/main/.github/workflows/assign-yourself.yml

name: Assign
on:
  issue_comment:
    types: [created, edited] // action runs on new and edited issue comments

jobs:
  one:
    runs-on: ubuntu-latest
    steps:
      # .take in an issue comment. 
      - name: take an issue
        uses: bdougie/take-action@main
        env:
          GITHUB_TOKEN: ${{ github.token }}
```

_Learn how I build this action on YouTube, [Build GitHub Actions with a Docker Container](https://www.youtube.com/watch?v=NRCqL9ifpcw)_

The way I power this feature is through a GitHub Action. Not allow any GitHub user the ability to assign an issue is an intentional security precaution. Only GitHub Organization members can assign themselves to issues. 

![Screen Shot 2021-02-05 at 1.19.40 PM](https://dev-to-uploads.s3.amazonaws.com/i/7y2hpblokxzlmfo32s2e.png) 

This can be a blocker during times like Hacktoberfest when you want to contribute to an issue, but you can't assign yourself as a non-org member. So I've taken the time to create an action called take-action. This is an Action. I've leveraged in my repo to provide the ability to have folks take action on issues. 

{% github https://github.com/bdougie/take-action %}

Now most Actions, including this one, are open source. So if you're interested in learning how to accomplish this, contributions are welcomed. Now any first-time contributor can check the assignee field to see what's ups for grabs. No more commenting on tasks to ask if this problem has been solved or currently being worked on.

_This is part of my 28 days of Actions series. To get notified of more GitHub Action tips, follow the GitHub organization right here on Dev._

{% link https://dev.to/github/generate-semantic-release-with-github-actions-2lll %}
Why I want to be part of Codevillage FullStack Program💻
Tags: javascript, codenewbie, java
Published: 2021-02-05 18:28:24

Musa Muhammad Etudaye 

  I am a teenager who finds  programming and coding very interesting,therefore i started learning how to code since the middle of last year.so I started with Java,though  I didn't  learn it for a reasonable amount  of time due to some certain unforeseen circumstances that came through.

  So early this year I was going to continue  from where I have stopped while I was learning Java,but this time I decided to start  with javascript and I am planning on giving it all my all to make sure I become a Full Stack Developer.

  Therefore I joined this particular organisation that gives access to individuals to learn javascript to a very reasonable extent and there are lots of extra opportunities that comes with it if you end up being  a professional. The name of the organisation is CodeVillage,So I joined the organisation to ensure that I become a Full Wedged Full Stack Developer by the end of the day.

  I hope this journey I am about to start becomes  a very amazing and ambitious journey  for me in the end,and I say kudos to all programmers out there because  it's  no easy task,if it were easy we did have a lot of people in the field.
Coding Grace Feb21 Newsletter is out!
Tags: diversity, newsletter, womenintech, irishtechcommunity
Published: 2021-02-05 18:27:16

I can't believe it's Feb already!! And this time our newsletter was released on time this week. 🙌

You can read the latest newsletter where I curate tech events (especially diversity in tech events in and around Ireland) and other tech community news tidbits here: https://mailchi.mp/55c2af5aa4cd/cg21-feb-news

### 😅 Corrections 😅

As with late nights publishing things while bleary eyed, even with link checking and all, mistakes still are made. So apologies, if you find any let me know.
![](https://media.giphy.com/media/snwvCcEKk33Hy/giphy.gif)

* **Irish Tech Society & GAA International Hackathon** - this event is happening this weekend starting today. And the link was incorrect, should be: https://www.eventbrite.ie/e/irish-tech-society-gaa-international-hackathon-powered-by-microsoft-registration-136923970281
 
![](https://media.giphy.com/media/Pm4IA0XrTWwE2DaTMI/giphy.gif)
I'm still curating a [live list of Irish and Northern tech community events](https://codinggrace.com/news/jan-2021-irish-virtual-tech-events-listings-2021-1-6/) (although I am working on a wee project to hopefully take the workload of curating and updating by hand, it's been on my TODO for a number of years). It's going to be a very simple looking site, but hopefully helpful for the community and will definitely be helpful for me when I pull info for my newsletters, etc. Plus my curated list of Diversity in Tech Irish and Northern Irish groups will be part of this new project as well. Hopefully this will increase community contributions instead of me updating all the time. 🌈
{% link https://dev.to/whykay/diversity-in-tech-groups-in-ireland-and-n-ireland-timeline-since-2017-3p82 %}

![](https://media.giphy.com/media/QsbLB4IXCjyALcnSrG/giphy.gif)
# Am I missing an event, CFPs, opportunities? 
Let me know in the comments below. If you have any questions, drop it below also. I'll be in touch.

![](https://media.giphy.com/media/7NoNw4pMNTvgc/giphy.gif)
If I find other updates, I'll add to this post. 

Enjoy! 😊
Does Your Team Manual Test Before or After Merge?
Tags: discuss, testing
Published: 2021-02-05 18:00:52

Testing before merging helps ensure that the main branch is always in a good releasable state. However, it also comes at the high cost of keeping each branch alive for an extra couple of days.

In my experience, the longer a branch stays stuck, the greater the hassle for the developers: more difficult merges, more simultaneous mental models of the application to switch between, increased difficulty sharing code. Inevitably, the developers start creating branches off of branches to simplify their situation.

This problem recently came to a head where every bug the testers found had already been identified and fixed in a subsequent branch. While each branch was related to an independent story, since we were creating a new application that was still in its early stages, each change ended up overlapping the same regions anyway.

So the question the team is wondering, is the hassle of testing in-branch really worth it?
Test JS Summit
Published: 2021-02-05 17:44:44

A brief summary of Test JS Summit event.
I've really appreciated it! 
Now it's time to establish all these practices I've discovered. 

I've made some sketchnotes of the talks, you can find them here: http://anediaz.com -> http://anediaz.com/#/illustrations

The event's link: https://testjssummit.com/

![Sketchnote](https://dev-to-uploads.s3.amazonaws.com/i/nw2k9i1dd20v3hnjt7rq.jpg)

#TestJSSummit #javascript #webdev #test
Set up a CI pipeline in GitLab to build and push Docker Images from a Git repository
Tags: devops, docker, cicd, git
Published: 2021-02-05 17:40:10

> DevOps has become a very essential role in today’s software development teams. As we all know that the main job of a DevOps engineer is to handle integrations and deployments in an Agile environment. It covers operations like setting up CI/CD pipelines, containerizing applications, setting up servers, etc.

> In an agile environment, teams continuously commit their changes to a version control system, these commits include new features, improvisations over old features, and bug fixes in the system. To reflect these changes on the Testing/UAT/Production servers, pipelines are set up that can pull the latest code from the version control system, build the image and push it to the corresponding container registry. Generally, Docker supports pipelining only from GitHub & BitBucket, unfortunately, with GitLab, you need to set up this pipeline from your GitLab repo itself and not from Docker.

Follow the below steps to set up your pipeline. (Note: Assuming that you have created your Docker Hub registry and a GitLab repo)

## Step 1
**Create a `.gitlab-ci.yml` file in the project**
The .gitlab-ci.yml file is a YAML file that holds the configurations for your Docker Hub. A GitLab repo consisting of this file runs the commands in the file whenever a new commit is pushed to the repo.
Refer here: [https://docs.gitlab.com/ee/ci/yaml/](https://docs.gitlab.com/ee/ci/yaml/)

The YAML file should look like this
```
image: docker:latest
services:
    - docker:dind
variables:
    LATEST_VER: {imagename:tagname}
stages:
    - Build image and Push to Docker Hub
docker build and push:
    stage: Build image and Push to Docker Hub
    only:
        - master
    before_script:
        - echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
    script:
        - docker info
        - docker build -t $LATEST_VER .
        - docker push $LATEST_VER
```
## Step 2
**Set CI/CD variables in GitLab**
1. Log in to GitLab using valid credentials.
2. Go to the repository.
3. Scroll down the left panel to find the ‘Settings’ options.
4. Click on the ‘CI/CD’ sub-option.
5. Now find the ‘Variables’ sub-section (fourth option) and expand it.
6. Add two new variables using “REGISTRY_PASSWORD” and “REGISTRY_USER” as keys. The values should be the password and username of your Docker registry, respectively

Done! now make changes and push your code. Check the ‘CI/CD -> Pipelines’ section in your GitLab repo menu to check the status of your pipeline.
Modern App Development on Salesforce And Heroku - the Entire Series
Tags: tutorial, architecture, webdev
Published: 2021-02-05 17:34:40


In this series, I document what I've learned from a series of [13 Trailhead Live video sessions](https://www.youtube.com/playlist?list=PLgIMQe2PKPSK7myo5smEv2ZtHbnn7HyHI) on Modern App Development on Salesforce and Heroku. I followed this series to stay current on Salesforce platforms' latest app development trends. 

This knowledge is vital for my career progression. With the experiences gained from this series, I can now better help my business using Salesforce and Heroku in the digital transformation journey.

In the articles below, I'll walk you through how to combine Salesforce with Heroku to build an eCars app. ECars is a sales and service application for a fictitious electric car company ("Pulsar"). It allows customers of Pulsar to customize and buy cars. The app also helps service technicians to view live diagnostic info of the vehicle and more. 

I'll share a step-by-step tutorial building the app, what I've learned, some of the highlights, and my take on some of the content. You can find all the [code for the project here](https://github.com/trailheadapps/ecars).

You can click on the below links to read more:


Part 1 - [Modern App Development on Salesforce and Heroku](https://dev.to/jasonomnivo/modern-app-development-on-salesforce-and-heroku-206j)
Part 2 - [Jumping into Heroku Development](https://dev.to/jasonomnivo/jumping-into-heroku-development-48ep)
Part 3 - [Data Modeling in Salesforce and Heroku](https://dev.to/jasonomnivo/data-modeling-in-salesforce-and-heroku-data-services-569e)
Part 4 - [Building Front-End App Experiences with Clicks, Not Code](https://dev.to/jasonomnivo/building-front-end-app-experiences-with-clicks-not-code-2m6e)
Part 5 - [Custom App Experiences with Lightning Web Components](https://dev.to/jasonomnivo/custom-app-experiences-with-lightning-web-components-4i39)
Part 6 - [Lightning Web Components, Events and Lightning Message Service](https://dev.to/jasonomnivo/lightning-web-components-events-and-lightning-message-service-21b8)
Part 7 - [Automating Business Processes Using Salesforce Flows and APEX](https://dev.to/jasonomnivo/automating-business-processes-using-salesforce-flows-and-apex-923)
Part 8 - [Scale Salesforce Apps Using Microservices on Heroku](https://dev.to/jasonomnivo/scale-salesforce-apps-using-microservices-on-heroku-43k7)
Part 9 - [Scale Salesforce Apps Using Microservices on Heroku pt2](https://dev.to/jasonomnivo/more-scaling-salesforce-apps-using-heroku-microservices-3k1f)
Part 10 - [JavaScript Unit Testing](https://dev.to/jasonomnivo/javascript-unit-testing-24k7)
Part 11 - [Apex Testing](https://dev.to/jasonomnivo/apex-unit-testing-on-salesforce-1968)
Part 12 - [Deploying Salesforce and Heroku Apps with Ease](https://dev.to/jasonomnivo/deploying-salesforce-and-heroku-apps-with-ease-1d0g)
Part 13 - [Automate Developer Workflow and Deployments](https://dev.to/jasonomnivo/automating-developer-workflows-and-deployments-on-salesforce-and-heroku-1co)
Avoid applying to the companies that use Microsoft Outlook
Tags: microsoft365, microsoftexchange, microsoftoutlook, jobsearch
Published: 2021-02-05 17:25:40

This job search hack is the first in the series of posts, where the author will be sharing with the community his subjective and unconventional views and tips.

Before you apply for a job at a company, check out their website’s DNS records (e.g. using this domain lookup service at https://websniffer.cc/domain ) to find out if they are using Microsoft Exchange / Outlook for email communication. If so — avoid them!

Read the whole article at the author's blog: https://www.tamrazyan.com/job-search-hacks-avoid-microsoft/
CLI PROJECT - COUNTRY DATA APP
Published: 2021-02-05 17:01:12

It's the third day of project week at Flatiron school and I'm still staring at a blank screen on my code editor. I'm lost. Confused. Not that I don't have the skills to start my project, I just don't know where to start from. Gretchen, our cohort educational advisor, comes through big time for me with a video that helps students plan out their project week. This was key to me taking what I consider my biggest step so far in becoming a software developer.

I decided to make an app that helps users find relevant information about countries since I love traveling and geography so much. Making this project was not easy by any means but at the same that it was so fulfilling. I struggled, was stuck on getting a single loop to work for days but thanks to the immense support from my fellow cohort mates I was able to make it. I started out the first day of project week somewhat doubting myself and my ability but today I can confidently say I feel competent enough.

This whole process has helped me expand my knowledge base and also has helped improve my problem-solving skills. What I've been able to learn from this exercise, I don't believe I would have been able to learn from just completing the labs alone, and for that, I am very happy. I have also learned that proper planning is absolutely key to success as a developer. Overall I am very happy with the outcome of this experience and I can't wait to see what lies ahead for me at Flatiron school and beyond.
Contribute to a Geospatial analysis helper NodeJs/ReactJs open source project.
Tags: react, node, socketio
Published: 2021-02-05 16:57:25

I built a project, which allows you to do real-time air mission analysis. 

Anyone can use <https://drone.bdevg.com/> through this website to understand the whole application. 

### What you can do?
https://github.com/ats1999/drone-air-mission-planning/blob/main/README.md

### Do you want to contribute?
This is an open-source project and I am looking for contributions.
I have used the following tech stack

1. ReactJs
2. NodeJs
3. Material-Ui
4. <http://turfjs.org/>
5. <http://socket.io/>
6. Express
7. Redux
8. Large amount of file reading and waiting in nodejs.

If you have knowledge of any one of the above technologies and you want to contribute then comment on this issue https://github.com/ats1999/drone-air-mission-planning/issues/4