teleren/devto huggingface dataset:
🔪 killing tmux
Tags: cli, linux, tmux
Published: 2021-08-14 15:44:48

---
title: 🔪 killing tmux
tags: ['cli', 'linux', 'tmux',]
series: tmux
canonical_url: https://waylonwalker.com/tmux-kill-tmux/
published: true

---


Now it's time to switch gears, we are onto a different part of our day and there are just too many sessions running and we need to clean up shop.

## kill-server

One viable option is to nuke the whole dang thing.  I actually do this more than you might think.

``` bash
tmux kill-server
```

> save and commit your work diligently before `kill-server`

## kill-session

A more reasonable option might be to kill a single session.

``` bash
# kills the current session
tmux kill-session

# kills the session named scratch
tmux kill-session -t scratch
```

## choose-tree

Killing sessions one by one from the command line can be a bit tedious, and involve more keystrokes than necessary.  Another option built right into tmux is `choose-tree`.  By default `choose-tree` is bound to `prefix+s`, that's pressing control+b then s.  Once you are in `choose-tree`, you can navigate around with your configured navigation scheme, press `x` to kill a session, or pane or window then `y` to confirm.  You can also batch delete by tagging items with t, and killing them all at once with `X`.


  <div class="onelinelink-wrapper">
      <a class="onelinelink" href="https://waylonwalker.com/tmux-choose-tree/">
          <img style="float: right;" align='right' src="https://images.waylonwalker.com/tmux-choose-tree-og_250x140.png" alt="article cover for 
 tmux choose-tree
"/>
          <div class="right">
              <h2>
 tmux choose-tree
</h2>
          </div>
      </a>
  </div>


> check out this post for a bit more information on choose-tree

## fuzzy matcher

Here is my preferred way, using a fuzzy matcher.  I recently improved this one by making it a popup and cleaning it up based on a repsonse,[tmux-output-formatting](https://qmacro.org/autodidactics/2022/08/06/tmux-output-formatting/) by [DJ Adams](https://twitter.com/qmacro).  I press prefix+k to bring up a kill-session menu.

``` bash
bind k display-popup -E "\
    tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
    fzf --reverse -m --header=kill-session |\
    xargs -I {} tmux kill-session -t {}"
```

> note this is setup to multiple sessions all at once.


Be sure to check out the full YouTube playlist and subscribe if you like it.

[![tmux playlist on youtub](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v4cgo76y53s1hwykajo1.png)](https://www.youtube.com/playlist?list=PLTRNG6WIHETB4reAxbWza3CZeP9KL6Bkr)

{% post https://dev.to/waylonwalker/how-i-navigate-tmux-in-2021-2ina %}
Expectations on Junior Developers are not what you think
Tags: career, beginners, codenewbie
Published: 2021-08-14 15:18:02

Your first day as a junior developer is gong to be scary, not because *being* a junior dev is scary but because the first day of any job is scary. Meeting new people, seeing a new code base, expectations that you can and will write code and deliver is on time, all of these combine to be quite stressful. 

I have a secret to tell you, the expectations on junior developers is pretty low and that's because the job of being a developer is different from simply "knowing how to code". 

- Communicating with none technical people
- Estimated how long something will take
- Learning the existing code base and data structures
- Working with git in a team
- Debugging live applications

All of these are core skills of being a developer that can really only be learned "on the job", with this being your first job no one expects you to know all these things. 

So what do they expect from you?

1. **That you can code simple solutions to simple problems**. Don't get fancy, your code will likely not be the best structured and so 3 levels of ternary on one line isn't going to impress anyone if they can't understand it. Use simpler constructs with good variable and function names and focus on expressing your codes intention as clearly as possible.
2. **That you will listen**. You might come in with a few projects under your belt but in the grand scheme of things you just haven't been coding long enough to not be able to learn something from everyone on the team. Right now, the best thing you can do is learn about the code base, learn about the business needs and absorb as much as you can on all aspects of developer life. This also applies to feedback, don't be defensive about your code, accept code review comments and make changes as suggested.
3. **That you are keen no matter the technology.** Companies that have existing code will have a lot of different technologies across their IT estate. If you know React and server-less but get asked to work on some crusty old PHP and JQuery app then just dive in. Take it as an opportunity to learn something and increase your future employability. If you want a long fruitful career in tech then you will be changing language and technology often, at this stage working on older stuff is just as valuable as new stuff.
4. **That you help**. Don't just stick to your work and ignore what's going on around you. If a deployment has gone wrong, find out if you can help - it might just be monitoring a stream of logs but it's helping the team. If the database has gone down and customers are sending support requests faster than they can be closed, then see if you can help answer them. If someone is stuck, even if they are a senior, ask if they can explain it to you, often giving them someone to talk it though with leads to a solution due to the new perspective they gain.

Following these 4 tips will put you head and shoulders above many new developers and show you are in the career to develop both technically and as a professional.
Build INTERACTIVE Analytics Dashboards | METABASE. Part2: Connecting to Database
Tags: analytics, database, metabase, tutorial
Published: 2021-08-14 15:14:37

After submitting your profile information you will need to provide database connection so metabase can process your data.

Metabase supports wide range of databases including:
* MySQL
* PostgreSQL
* MongoDB
* SQLServer
* Oracle
* And more! you can check list of [officially supported databases](https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#officially-supported-databases)

In this tutorial we will use MongoDB [sample database](https://docs.atlas.mongodb.com/sample-data/) as our data source.

## Connecting to MongoDB

We will need to get database connection string. So in your ATLAS dashboard press on Connect, then get the connection string.

![Getting Mongo Connection String](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qm0clst4ow1k4wmj6gdl.gif)

You will have a connection string similar to this one
```
mongodb+srv://DB_USER:*******@cluster0.4i388.mongodb.net/sample_analytics?retryWrites=true&w=majority
```
So copy it and replace the placeholders and then provide the connection string to metabase.
![Submitting connection string to metabase](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spkbp1irsvbspdvfpooq.gif)

### Important Note

Make sure to whitelist all the IPs in your ATLAS configuration so metabase can access it.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fwy34d74klakw0714qox.png)

Now the database is added as a data source in metabase and automatically metabase started generating some charts for you.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3b8uf9f0dicbypxrsf38.png)

It was pretty easy right? In the next post we will discuss how to create custom charts in metabase.
📊 Build INTERACTIVE Analytics Dashboards | METABASE
Tags: analytics, database, metabase, tutorial
Published: 2021-08-14 14:22:56

There actually exists a free, open source and cool service that helps you visualize your own data. Welcome to [Metabase](https://www.metabase.com/)!

Metabase is a powerful platform that allows you to ask question about your data, then it will do some _science_ and eventually you will see your question is answered with generated charts.

![omg-oh-my-god](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6qno1rocw308jlx5h4e.gif)
 
## Getting Started

Although there exist enterprise (_paid_) plans on metabase, but you can still build it locally by following this [guide](https://www.metabase.com/docs/latest/operations-guide/running-the-metabase-jar-file.html). Or you can deploy it on heroku with a press of a [button](https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-heroku.html).

We will go with the heroku approach. Once you press the **deploy to heroku** button you will be redirected to heroku. Enter the application name and hit the deploy app button.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtpfjqefwtui4iw4qbx1.png)
 
There is an authentication system that is built in metabase. So in your first time accessing your platform you will add your account details you will use to access your dashboard in the future.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28vrupwby5im0ag4wbdy.png)
 
In the next post we will discuss connecting to your database. So let me know in the comments what do you think about metabase and if you know similar platforms!
X.app: Picture-in-Picture + Fullscreen Video Extension for iPhone and iPad, supports Safari, YouTube and Chrome.
Tags: xapp, app, ios, iphone
Published: 2021-08-14 14:03:52

X.app features 2 extensions for changing video mode:
* Picture-in-Picture Video Extension
* Fullscreen Video Extension

App Store download link: https://apps.apple.com/us/app/x-app/id1533525753


Picture-in-Picture Video Extension activates PiP in all apps on iPhone and iPad:
- in Safari PiP is activated natively
- in other apps like YouTube and Chrome, video is transferred to in-app browser, which handles video presentation.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wgukjjre38y1gicfqxyq.png)


Fullscreen Video Extension activates native fullscreen UI for videos. 
Unlike custom interfaces provided by YouTube and Twitch, native interface provide responsive scrolling toggle and skipping buttons, which can be useful for watching long videos.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkujj230egjta3r2t4qg.png)


Extension can be launched from Share Menu in every app:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpvw560yfok8mrn4zgfz.png)


Installation of extensions is really easy:
- select “Picture-in-Picture” or “Fullscreen” tab
- tap “Open Extension Picker”
- tap “Edit Actions…”
- add extension by pressing “⊕”
- tap “Done”

Extension is installed and can be used from any browser and app which supports sharing a URL via Share Menu can use X.app’s extensions.

Supported Browsers:
- Safari
- Chrome
- Brave
- etc

Supported Apps:
- YouTube
- Vimeo
- Twitch
- TikTok
- IGTV
- etc

As it has been mentioned, X.app has in-app browser, which handles PiP and Fullscreen modes, the URL with a video page can be entered:
- manually 
- from the Clipboard
- via Quick Action on X.app icon.

Overall X.app provides complete experience for Picture-in-Picture and Fullscreen video modes, which are not provided or not available in majority of video apps.
A terminal Minesweeper Game with Python
Tags: python, minesweeper, game, codecademy
Published: 2021-08-14 13:56:21

I coded a minesweeper game with Python, which can be played in the terminal. I coded it as a final project of my Codecademy Computer Science Course. It was a good challenge but I think the result is neat for a newbie. Here's its link: https://github.com/hsbcode/cs1.git
The Start of every Professional Modern Frontend Developer of all times .
Tags: frontend, angular, dev, fullstack
Published: 2021-08-14 13:52:53


Inspired by [RoadMap Website](https://roadmap.sh/frontend)	 , here is my take:

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

2. Computer Science Fundamentals
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17lgjbp3fcdb1fftopcn.png)
 
3. Internet
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u629cnrqr38ufxcortzv.png)
 
4. HTML & CSS
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/usg3s5sbvyepejg8e4ok.png)
 
5. JavaScript
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/krwnfudrn15oqzo19183.png)
 
6. Ecosystem
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15trtwfaf7b9pualq7nt.png)
 
7. Git
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0cizblvgjxqf7amqqnn.png)
 
8. NodeJS
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3aocdn3vwx5y767o8mh.png)
 
9. ReactJS (or Angular , Vue Js ,...)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44cxlxohxwr95ja07dju.png)
 
10. Modern CSS
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wtw4iiilpdpvuk3cyzs.png)
 
11. GraphQL
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ccbb5wr3syypujz7x8tz.png)
 
12. TypeScript
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4n0ccefna3mju5dtc6ca.png)
 
Happy coding, Ayoub (DoraymonIT).

Just a PS ,I’m working on every steps on details ( theory with real-world practice ), just wait up , The best is coming yet .

This is ME : [LinkedIn](https://www.linkedin.com/in/ayoub-bendrimou/)
What are web beacons
Published: 2021-08-14 13:43:54

## Introduction
What technology is being used to send a read state to the web server that you have read a particular message on Google Chat and Whatsapp web? It is web beacons, lets learn more about them.
A web beacon is a small object, usually a 1x1 gif or a script, used to send information from the user back to the web server. Beacons generally send information from the user to the web server for statistical purposes. It is used to collect metrics from the users' browsers. It is also used for tasks other than statistical ones.

## History
GIFs were the main type of beacons in older times, the gif was very small and it was downloaded to the user's computer automatically, resulting in the user's GET request to the web server. The GET request sent some information about the user and some performance metrics.

## Where is it used
- It is used to collect performance statistics from users
- It is also used to collect data from users to train machine learning models, like google and facebook
- It is also used in whatsapp blue ticks, when you view a message from someone else, the beacon is sent to the server carrying the information about the user and about the reading of the message.
- It is used in emails, when a user reads an email, the beacon is sent to the server saying that the user has read the email
Let the FORTH be with you
Tags: programming, style
Published: 2021-08-14 13:42:32

Not many readers will know the progamming language **FORTH**, that was developed in 1970 by Charles H. Moore (not THIS [Moore](https://en.wikipedia.org/wiki/Moore%27s_law)), who was programming on an IBM 1130 computer in Fortran, ALGOL, PL/I and Assembler. The 1130 was called a "third-generation computer", which had about the cpacity of an arduino nano, but the peripherials like a card puncher/reader had the size of a fridge.

Moore wanted a more flexible and interactive approach, so he created a new language, which he thought could be a perfect match for the upcomin micro-comupters, which where called the "fourth-generation". As the 1130 permitted only five-character identifiers, FOURTH became FORTH, a nicer play on words anyway.

FORTH featured an ingenious simple concept, using a stack as it´s only memory. Every input was pushed ontop of this stack, regardless of its type: Constants, operators and even function definitions could be pushed. So, mathematical operations used a inverted polish notation. To add two number, just write
```
3 4 + .[RETURN]
7
```
Commands are executed immediately after pressing return, the dot at the end advises the program to print the result.  
Function definitions started with a ":" followed by a function name and end with a ";". So, a function was defined like this:
```
: addFour 4 + ;
3 addFour . [RETURN]
7 
```
All functions are stored in a dictionary, that is growing with every definition. So, writing a program just meant to start with an empty directory and add more and more functions. Finally, the last function was called to execute the program. (If you want to learn more, there is still an active [community](https://forth-ev.de/) and a nice [online documentation](https://www.forth.com/starting-forth/0-starting-forth/).

The core of FORTH system can be increadibily small (only some kB), and most of the core was already programmed in FORTH itself. As FORTH can act as an operation system too, it gained some popularity in a varity of application field.

Though FORTH is available for almost any computer system as open source, it never reached a larger community for some reasons:

- Using stack oriented operations is very machine-friendly, but not easy to understand.
- The lack of more advanced structures made it very hard to follow the program logic. Reading and understanding a program was nearly impossible, even if you created the code yourself 14 days ago.

Nevertheless, FORTH programmers regularly won speed programming contests as programming in FORTH may be very efficient and compact.

**So, what can we learn from this?**

Maintainability and human readability are very important for any programming paradigm. Maybe you find a very tricky and smart way to solve a problem. If you are not able to understand your solution some days later, maybe the solution was not a s good as you thought? 

Today, we find lot´s of discussion about OO vs Functional Programming. Even if the one or other approach has some advantages, it is still important care for the human readability.
Link Shortener (Multi-User) - Firebase and React [9.5 hours youtube series]

Tags: react, firebase, javascript
Published: 2021-08-14 13:07:16

Hello everyone,
I just finished up recording an entire series in which we build a Link Shortener application from absolute scratch! and by that I mean, it will be the first time for me as well.
We are going to. start with designs that I prepared in Figma and we will code it together, it includes the entire journey of starting with an idea/ design and building an actual product out it.

We'll build a full-stack Link Shortener App, similar to Bit.ly & Rebrandly (obviously it won't have all the features which they provide.)
In this application,
anyone can signup(email and password) and shorten long URLs, each link has a 'Total Clicks' counter which will be auto-incremented whenever anyone visits the shortened link.

This entire series includes, planning, structuring, data modelling and creating a roadmap of a product.

Check out the live version - https://smoul.xyz/

More Info - https://www.desicodes.io/link-shortener

Series Playlist - https://www.youtube.com/playlist?list=PLmA3URVkjqnm7n31fUF7VDhWXjeEaZK2l

Frontend - React

Backend - Firebase (Authentication, Firestore database, Cloud functions and Hosting)

Bonus: We will also write security rules from scratch.
Token authentication requirements for Git operations
Published: 2021-08-14 12:58:02

Hi guys!
Github recently some emails warning us about some of the deprecated methods of authentication we were using to push, clone etc on our repos. And incase there were some like me, we ignored this til the day it all stopped working and got stuck.

Anyway, don't worry. There's an easy I found to fix this asap.

Login to your github account and follow the next steps:


 1.   In the upper-right corner of any page, click your profile photo, then click Settings. Settings icon in the user bar

2.    In the left sidebar, click Developer settings. Developer settings

3.    In the left sidebar, click Personal access tokens. Personal access tokens

4.    Click Generate new token. Generate new token button

5.    Give your token a descriptive name. Token description field

6.    To give your token an expiration, select the Expiration drop-down menu, then click a default or use the calendar picker. Token expiration field

7.    Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo.

8.    Selecting token scopes

9.    Click Generate token. Generate token button

10.   Copy safe your Newly created token as you will use this as your password every timeyou want to perform a push.

****    Warning: Treat your tokens like passwords and keep them secret. When working with the API, use tokens as environment variables instead of hardcoding them into your programs.


Using a token on the command line ###########

Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS.

For example, on the command line you would enter the following:

$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token

Happy Coding!
JavaScript 'this' illustrated: Learn it once and for all!
Tags: javascript, tutorial, webdev, codenewbie
Published: 2021-08-14 12:48:39

Hey There 👋🏾

In today's post I wanted to ask you all a question. 

> How many of you really understand the `this` keyword in **JavaScript**? 🤔

---
I myself have conducted several **JavaScript interviews** so far and sometimes I ask this question as a way to get things started and the kind of answers that I get are:

- It points to the `Object` (what object?)
- It points to the `function` (which function?)
- It points to itself (consciousness?)

---

Although there is a trend growing up which considers the need to use `this` is JavaScript as a *bad practice* and suggests to *move away* from it. 

That might be correct, but knowing about how something works is always good, whether we decide to use it or not!

So let's do it today! 🙌🏾

Let us see how the `this` keyword in JavaScript really functions. 

### The actual answer
Well, most of the times the answer that we provide to that question is wrong, because the way the `this` keyword works, differs based on where the `this` keyword is being used. 

And that is the key to understanding it. Break it down into scenarios and look at it from a *per scenario* basis. 

#### Inside a function
Inside any function in the `global` scope, the `this` keyword points to the `global` object in *non-strict* mode and is `undefined` in *strict* mode.

#### As a method on an object
When invoked as a method on an object, like `person.getName()`, the `this` keyword refers to the object on which the method is being invoked. 

#### When invoking with call
When the function is invoked using call, like `getName.call(animal)`, the `this` keyword refers to the object that is being passed to the call function.

#### When invoked with the `new` keyword
In this case, when we are in the process of creating a new object by invoking a function with the `new` keyword in front of it, like this:
``` javascript
let bruno = new Dog();
```
Then inside the `Dog` function, all the `this` keywords would point to the object that gets newly allocated and returned.

Here's the same explanation in an illustrated format for the **visual learners** reading this post:
![this is JavaScript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hz1nvbaq897rmhp46b2b.png)

And that's it. Those are the cases that would cover more than 95 percent of the scenarios. 

Now you know how to answer that tricky question. 

See you in the next one, Cheers! 🙌🏾

PS:
If you liked the illustration above, you might like my 🎊**FREE**🎊 ebook that I recently released which covers several other JavaScript concepts. Feel free to get a copy by clicking on the image below:

[![js illustrated book](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykn1m9yp1414bowbd3hd.png)](https://t.co/93o0KigRmv?amp=1)