teleren/devto huggingface dataset:
Easy scrolling with tmux and alacritty
Tags: linux, commandline, productivity, terminal
Published: 2020-04-29 17:05:34

---
title: Easy scrolling with tmux and alacritty
cover_image: https://user-images.githubusercontent.com/38859656/80623620-78472c80-8a18-11ea-933d-00b52178f809.png
published: true
description: A quick workaround that your fingers will enjoy
tags: linux, commandline, productivity, terminal
---
We want to have a nice experience when scrolling the terminal buffer using both alacritty and tmux on Debian linux.

When we run alacritty and tmux together and there's a lot of text on the screen (say, by invoking `tree`), we need to hit the following tmux key sequence to scroll back through the terminal history: 

```
Ctrl+B 
[
PageUp
```

This is difficult.  Others have [asked about this](https://github.com/alacritty/alacritty/issues/1194).

We followed the workaround advice given by the author.  We enabled mouse mode, and disabled faux scrolling in `.tmux.conf`: 

```text
set -g mouse on
set -ga terminal-overrides ',*256color*:smcup@:rmcup@'
```

In `.alacritty.conf`, the default scrolling key combination, `Shift+PageUp`, isn't too bad.  We can just leave it commented to use it, but if we want to try our own settings, we can:

```text
key_bindings:
#
# ...snip...
#
- { key: PageUp,   mods: Shift, action: ScrollPageUp,   mode: ~Alt       }
- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt       }
- { key: Home,     mods: Shift, action: ScrollToTop,    mode: ~Alt       }
- { key: End,      mods: Shift, action: ScrollToBottom, mode: ~Alt       }
```

## Resolution

With the changes to `.tmux.conf`, we can now start an alacritty terminal, enter tmux, and scroll to our hearts' content, without using a difficult key combination.

🔥 It's FAST! 🔥

We found that scrolling through history with some basic command line apps wasn't negatively impacted. 

When we entered tmux + alacritty, and then dumped a lot of text into `less`, or navigated `man bash`, we scrolled happily and without interruption.

These instructions probably apply to other terminal emulators, as well.

This is a happy time. 😄
REMIX- A new React Framework from the creators of React Router
Tags: react, seo, webdev, javascript
Published: 2020-04-29 18:44:13

> Finally, a killer React framework from the creators of React Router


If you have been developing Single Page Applications (SPAs) using React you know that there are a couple of problems that creep into our application because of the way react basically works by default. For example, the most common problem, it is very difficult to have good SEO if you are using client-side rendering (CSR) in React.

This is because, in the case of CSR, the data you see on the page is generated by the JavaScript in the browser itself. It is also very difficult to have dynamic Metadata on such websites.

Single-page applications (SPAs) due to these reasons are commonly regarded as non-SEO friendly websites.

You can learn more about the pros and cons of SPAs [here](https://www.cloudways.com/blog/single-page-website-spa-seo/#single-page)

To solve this problem (along with other problems with CSR), we use different technics like Server-side rendering (SSR), prerendering, etc.

Since it is a bit difficult to do React SSR manually, we have different React frameworks to make our job easy.

One of such React frameworks which is very popular is [Next.js](https://nextjs.org/)

Similar to frameworks like Next.js, the people who developed [React Router](https://reacttraining.com/react-router/web/guides/quick-start) (The most popular routing library for React) are working on a **NEW React framework** to solve all the problems we face while developing with React.

They have named it [Remix](https://remix.run/).

Some of the highlighted features of Remix are as follow-

* File system routes
* Route layout nesting
* Automatic code splitting
* Data-driven meta tags
* Built-in data loading
* Location-based Suspense cache
* Streaming server rendering
* Zero-config build
* React Refresh
* Server rendering in dev
* Deploy anywhere
* ...and more

Here is the first preview of Remix on YouTube. You'll get a preview on routing, layouts, data loading, meta tags, data caching, and scroll restoration etc.

{% youtube MYxwlmeyu9w %}


You can subscribe to follow their progress and get early access here- https://remix.run/


Isn't it cool? Personally, I'm very excited about it. I know its gonna be a big thing because of the people behind it.

Hope you liked this post. You can follow me for more such interesting stories.

You can also connect with me at [LinkedIn](https://www.linkedin.com/in/ishubhamprakash/), [Twitter](https://twitter.com/isuvm), [Github](https://github.com/i-shubhamprakash/), [shubhamprakash.dev](https://shubhamprakash.dev)
OpenNMS Horizon 26.0.1 (Luchador) Released
Tags: news, activemq, horizon, minion
Published: 2020-05-04 19:21:03

---
title: OpenNMS Horizon 26.0.1 (Luchador) Released
published: true
date: 2020-04-29 18:30:19 UTC
tags: News,activemq,Horizon,minion
canonical_url: https://www.opennms.com/en/blog/2020-04-29-opennms-horizon-26-0-1-luchador-released/
cover_image: https://i.imgur.com/74fmzvG.png
---

Release 26.0.1 is the second release in the Horizon 26 series.

It is an off-schedule release to fix a vulnerability in ActiveMQ and the Minion. Thanks to Florian Hauser of Code White for catching this one.

The codename for 26.0.1 is [Luchador](https://en.wikipedia.org/wiki/Lucha_libre#Masks).

### Bug

- Authenticated RCE vulnerability via ActiveMQ Minion payload deserialization (Issue [NMS-12673](http://issues.opennms.org/browse/NMS-12673))
Gamifying Authentication
Tags: news, discuss
Published: 2020-04-29 19:23:39

Has anyone recently seen what appears to be a new way of authenticating that the person filling in the form is a real person?

Twilio has recently updated its sign-in process.

I was greeted with am upside down Polar bear with instructions on how to play the game. In order to prove that I was a real person. And not a zombie 🧟.

It also timed me!

Has anyone else seen something like this?
That blank stare
Tags: python, beginners, lessons
Published: 2020-04-29 20:17:31

I recently made a commitment to learn Python. Why Python? I thought it would make a good addition to my skills. I also like what I am seeing in the land of AI and Python. In addition, I work with Linux and already do Bash scripting in my everyday work; looking to switch my automation scripts to Python. 

Things have been going on smoothly so far. I had my first major (beginners major, not experts major) assessment the other day and aced it. There was one problem that almost threw me; the FizzBuzz test. I had the logic, but failed where I found most beginners fail - I won't spoil it by telling you.

Anyway, over the weekend I decided to take a break. You know, pump the breaks. Have a breather. Bad move! Or maybe I just need to work out how long a break is good for me. :(

I went back to studying today - my break continued through to Monday. I was in the middle of another assessment and wanted to see how much I would retain if I jumped right back in from there. It didn't go well.

I found myself stuck on a particular function problem that almost had me depressed. I unpacked the issue; wrote the code outside of a function and it appeared to work. And then I remembered I had to find even numbers. As soon as I add the bit that should do that "num % 2 == 0", everything falls apart. I have tried multiple things, but I keep getting the same error message. I now have that blank stare.

My current solution is to go back a few lessons and work my way forward again. The second solution is to plan better, which is where I turn to you.

How many hours in a day is a good balance for studying; especially if you are past 30yrs of age? Or does age not even matter?

Secondly, how many days off is sufficient to get back and pick up where you left off?

ps. Future posts will have code snippets. This is my first post :)
Cypress Network Interceptors in 20 Minutes
Tags: cypress
Published: 2020-04-29 21:34:13

Image: Cypress Trees and Black Swan : Fine Art America
```typescript
it("should be able to intercept the request and response to Person", () => {
      cy.server();  
      setInterceptor(/Person/)  
         .visit(`${homepage}/eligibility`)  
         .wait("@Route")  
         .should(function (xhr) {            
            expect(xhr.status).to.eq(200);
            expect(xhr.requestHeaders).to.have.property("Accept");
            expect(xhr.method).to.eq("GET");
            expect(xhr.response.body).length.greaterThan(2);
         });
   });

function setInterceptor(regex) {
   cy.route({
      method: "GET",
      url: regex,
      onRequest: (req) => {},
      onResponse: (rsp) => {
         debugger;
      },
   }).as("Route");
   return cy;
}
```
In the lines above, the cy.server() call is required by Cypress to intercept requests and responses. Next we are calling setInterceptor(regex), with a Regex expression to parse the URL. The cy.Route() takes in an object defining when to intercept, and has two callbacks (onRequest, onResponse).  The debugger statement allows for a breakpoint on the response. So far the key requirements are the cy.server() and cy.route() calls.

```Typescript
cy.server();  
      setInterceptor(/Person/)  
         .visit(`${homepage}/eligibility`)  
         .wait("@Route")  
```

We next; *.visit* the page that will call the Person endpoint. Finally we wait for the @Route to complete. Note this is an arbitrary name we used inside setInterceptor using this syntax .as("Route").

**The XMLHttpRequest, response**

We opened the browser within Cypress (showing the page we were testing), Pressed F12 and started the test.  The debugger statement in the setInterceptor routine provided us this view on the response.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7qtjyz1yv3bx6f2qt3sr.PNG)


Pretty cool way to test endpoints but,all being driven from your web site! This is the main reason Cypress is better than Karma.

**Take Away**

Cypress gives us function far superior to Karma, Protractor, and Selenium in that we can actually interrupt network requests and responses. I've heard that we can change headers too.  I like Cypress!



JWP2020
Animated GIFs of 3D Globes and Tilting the bar
Tags: threejs, glitch, javascript, tutorial
Published: 2020-04-30 04:17:40

## Animated GIF Horror

Yes, I know the spinning globe is really, really irritating. I am still way down on the learning curve with trying to reduce my beautiful, interactive 3D world of [Three.js]( https://threejs.org ) to work with you ["Flatlanders"]( https://en.wikipedia.org/wiki/Flatland ).

My goal is to be able to push a button on a web page I am working on and have a nice smooth animated GIF come out the other end. The GIF should be small enough to be under the 1 MB maximum size set by [GitHub Social Preview]( https://help.github.com/en/github/administering-a-repository/customizing-your-repositorys-social-media-preview ) and/or Glitch.

The code to generate an animated GIF from a three.js demo is Jaume Sanchez's [CCapture]( https://github.com/spite/ccapture.js/ ). It creates a [WebM]( https://en.wikipedia.org/wiki/WebM file and then uploading to [EZGif]( https://ezgif.com/video-to-gif) for optimizing. It's all fairly easy to use, the only issue is that there many parameters from from the number of colors in a bitmap uses as a texture in the 3D model to the FPS used by CCapture compared to the FPS used by EZGIF. So getting anything going takes a lot of trial and error - and lots of groaning and saying to to yourself "Oh dang! Another 10 MB file".

The problem with a spinning earth is that it is no fun unless you go all the way around at a nice smooth gentle pace. At 60 frames per second for ten seconds that's 600 frames. Well, that takes a file of many megabytes. So you end up just looking for a less-sucky compromise.

## Tilting the Bar

What is the animated GIF showing? It is a demo of the problem I am posing for tomorrow's [pair programming session]( https://dev.to/harald3dcv/three-js-visualizations-with-theo-armour-week-2-1c40 ) with Harald Reingruber

{% user harald3dcv %}

I am trying to place sticks or bars that are at given latitudes and longitudes on the surface of a 3D globe. I have been doing this successfully in [c19-viz3d]( https://www.ladybug.tools/spider-covid-19-viz-3d/ ). You will note, however, that the bars are all circular in section. This means that the bars can be rotated at any angle and look OK. But if non-circular profiles are desired or if 3D text is desired, then the appearance - with everything tilted every which way - is not pleasing.

Below is the demo file used to created the animated GIF and the tilted bars. Click the "addMeshGeometryInstance" button in order to generate the bars = and note that they are all rotated at different angles. 

{% glitch theo-2020-04-29-tilted-bars app %}

Will we be able to get the "up" of all the bars facing in the same direction? Who knows, but we shall find out tomorrow.
do YOU sprint
Tags: datascience, python, discuss
Published: 2020-04-30 12:36:10

---
title: do YOU sprint
tags: datascience, python, discuss
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/g0susd3x94zklhjmr3co.png
---


Whether you are on an agile team or not do you hold yourself to small frequent communication cycles, or do you work a problem until it is as complete as possible?
Covid-19 Reports - Get Updates Even When Offline
Tags: twiliohackathon, javascript, html, css
Published: 2020-04-30 15:30:44

In most African/Asian countries, most citizens tends not to get updates about the global covid-19 pandemic. One of the reasons being the lack of steady internet connection.

The reports in Nigeria for example are updated every night around 8:00pm GMT and when this happens, it's only published on the Nigeria Center For Disease Control (NCDC) social handles. So if you have no access to the internet during this time, you'll be in the dark 🧟.

This was why we'd brainstormed to create a solution for solving this, and then we came up with **Covid-19 Reports** 💡

___

## What We built
**Covid-19 Reports** helps you channel your super power of getting the latest information about the covid-19 pandemic even when you're offline.

You'll only need to access the web app once and prompted to add your mobile number in order to get the updates. After this you'll get all the updates you need everyday (automatically) 🎉

### Also:
Visiting the app automatically detect your location (country precisely) and you'll only get reports based on this side, this was implemented so as not to bore 😴 you with large statistical data.

Another awesome feature is performing self test right on your mobile phone. Since the covid-19 symptoms are known, we'd decided to automate self test without even having to visit the hospital.

> + Other amazing features including **dark mode support**🤹


#### Category Submission: 
- Covid-19 Solutions
- SMS API Integration

## Demo Link
 https://inventorsdev.github.io/covid-hack/

## Link to Code
https://github.com/inventorsdev/covid-hack/

## How We built it
Covid-19 Reports is a progressive web app built with
- HTML, CSS, JavaScript, Framework 7 [Front End]
- PHP and SQL [Back End]

And SMS solution was made possible with Twilio SMS Api

Also, automation was done with cron job on a Linux web server
Remember your glasses-Focus sensation
Tags: codepen
Published: 2020-04-30 16:18:38

<p>Messing around with CSS filters. (No js!)</p>

<p>Forked from <a href="http://codepen.io/johnchinjew/">John Chin-Jew</a>'s Pen <a href="http://codepen.io/johnchinjew/pen/zrKOQd/">See the Stars - Dramatic hover effect</a>.</p>

{% codepen https://codepen.io/Min11Benja/pen/GorErX %}
Covid-2019 SMS service Web Application
Tags: twiliohackathon
Published: 2020-04-30 16:55:09

## Categories

COVID-19 Communications

## What I built

ℂ𝕠𝕧𝕚𝕕_𝟚𝟘𝟙𝟡 𝕊𝕄𝕊 𝕎𝕖𝕓 𝔸𝕡𝕡𝕝𝕚𝕔𝕒𝕥𝕚𝕠𝕟
           Hi there! I Pranav introducing to you a Web Application which gets you informed about the newly emerged 'NOVEL CORONA VIRUS' pandemic. It makes you aware of the live Statistics of the Covid-19 nationwide cases. It makes you periodically informed about the stats. These stats are from authentic sources which will definitely help you know the original numbers and thus making you alert . Alertness is very important. These updates about the number of cases will be sent directly to your mobile through SMS service.  All you need to do is simply register to the application your State,City,Mobile number and the Email itself. And you are done. Now you will be provided the statistical updates everyday at 9:00 IST and 20:00 IST.

NOTE : Please open Above link in Google Chrome(Highly Recommended)

## TechStack

    Template : EJS Template layout
    Back-End : NodeJS
    Front-End : HTML,CSS,Javascript
    Database : MongoDB
    Notifications : Twilio Programmable SMS API


## Demo Link
https://covid2019india-webapp.herokuapp.com/

## Link to Code
https://github.com/Pranav-mene/covid2019WebApp.git

## Resourses 
1.https://api.covid19india.org/data.json
2.https://thevirustracker.com/free-api?global=stats
3.Twilio
Patient Monitor - a dashboard to review records reported by patients
Tags: twiliohackathon, laravel, vue
Published: 2020-04-30 18:59:04

## What I built



A simple dashboard designed for both doctors and patients.
Doctor adds patients to his patient list by their phone number.
Once patient accepted the request - he's assigned to doctor and has an ability to submit records.
Doctor has an ability to review patient records (datatables).
Doctor has an ability to review data represented in charts.
There are 2 charts. First chart draws body temperature changes, and the second one - symptoms frequency.
Patient can report his body temperature and mention any symptom he or she has - cough, hard breath, sore throat, diarrhea, tiredness.

**Medical information is encrypted in the database.**

Of course, this is just an MVP. It needs a better UI, UAC test coverage and more useful features.
The idea is that this kind of product can unload doctors in clinics, that have patients they are responsible for. 
Instead of ton of phone calls patients could just submit their symptoms to their doctors periodically to review.

## Demo Link
http://patient-monitor.codebot.pro/login

https://www.loom.com/share/4786412dd7224d79bcb82057b9460915
https://www.loom.com/share/6bbaff94cf6f4ce6a0590b07f6fd4e50
https://www.loom.com/share/f9e4b152ac244a568fd5ec84e27019c5

## Link to Code
https://github.com/c0d3b0t/patient-monitor

## How I built it (what's the stack? did I run into issues or discover something new along the way?)

Docker containers (for development environment)
PHP 7.4
Laravel 7
Vue.js 
[Twilio Programmable SMS](https://dev.to/c0d3b0t/laravel-notifications-create-your-custom-notification-channel-1hg3)
MySQL
Deployed to AWS EC2 instance

It was interesting to work with vue/vuex/vue-router. :)

## Additional Resources/Info
Demo credentials for existing doctors/patients in the system at staging site: http://patient-monitor.codebot.pro/demo-credentials.pdf
Using Android Studio to develop Titanium modules
Tags: mobiledev, titanium, android, apps
Published: 2020-04-30 20:08:09

Since Appcelerator Titanium SDK 9 the build system uses gradle to compile apps and modules. This also allows you to open `build/` folders in Android Studio (4.x). 

When you develop an Android module you can even use auto-completion and other Android Studio features. In order to do this you will have to do the following:

* create a new module with `appc new` (select Ti module and follow the steps)
* go into the `module_name/android/` folder and compile it once with `appc ti build -p android --build-only`
* open the `module_name/android/build/` with Android Studio
* wait till everything is loaded
* go to the top left corner and select `project` in the drop-down
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/r2b3byr3to4d81sznspr.png)
* find your source files
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/362dww472vlwjk4csklu.png)

Open them, start working and enjoy the benefits of Android Studio!
Don't stop the party, PartyHub
Tags: twiliohackathon, elixir
Published: 2020-05-01 02:46:30


## What I built
#### Category Submission: COVID-19 Communications 

This is PartyHub, the place where all your parties will happen! At least while we are all in quarantine :/

![join party](https://dev-to-uploads.s3.amazonaws.com/i/w2w9rwrpmw8cg5937q2l.png)

Here you can create a party or visit any of the other ongoing parties. The first one to come will be that party's designated DJ. All other party-goers can choose to share their own video and choose who's video they see.

![all parties](https://dev-to-uploads.s3.amazonaws.com/i/an3l796kqxkjcuun0b2y.png)

## Demo Link

You can check the demo at https://party-hub.herokuapp.com/ (if it stops working I probably ran out of credits, my bad 🙈) 

## Link to Code

{% github AminArria/party_hub %}


## How I built it 

The stack for this project is a simple one:

- [PostgreSQL](https://www.postgresql.org/)
- [Elixir](https://elixir-lang.org/)/[Phoenix](https://hexdocs.pm/phoenix/overview.html)
- Twilio's [Programmable Video API](https://www.twilio.com/docs/video)
- JavaScript for some front-end magic, specially thanks to [Twilio's SDK](https://media.twiliocdn.com/sdk/js/video/releases/2.0.0/docs/index.html)
- [Bulma](https://bulma.io/) for CSS awesomeness



## Thinks to consider when using Programmable Video API

### You may consider a stream a single thing, but it's not

If you are like me, when you thing of a video stream you just think of **one** stream of data, but when using this API you'll quickly find out that's not the case. On the basic case you are presented with an audio stream and a video stream (there is also data stream, but let's ignore it). On API terms, they are called tracks and they are independent. Why is this important? Because SDK events like [trackPublished](https://media.twiliocdn.com/sdk/js/video/releases/2.0.0/docs/RemoteParticipant.html#event:trackPublished) will trigger twice, so if your handler isn't idempotent you'll start to see things happening twice.

### Subscriptions are stateless

Disclaimer: as mentioned above audio and video are to separate things, but for simplicity I'll grouped them with the word *track*.

On of the first things that bit me was how the subscriptions worked. Subscriptions are how the Twilio's API handles if you should get some track, for that they use *rules* (filters) to choose. The thing about rules is that the API don't manage their state, you can't remove, push, pop, append, or do any action over the existing ones. You need to send them the rules as you want them, nothing more nothing less.

The solution I solution I came up with, without having to persist anything to a DB for simplicity and time, was to manage the state of the rules on the front-end and just use the back-end as a proxy. It will receive the rules, add some default ones that everyone has, and send it off to the API. Later when the user is subscribed to new tracks it will get an event through the SDK.