teleren/devto huggingface dataset:
Bash alias for GMT
Tags: bash, timezones
Published: 2020-02-17 14:21:19

---
title: Bash alias for GMT
published: true
description: Simple bash script that lists out local and GMT time for the last 24 hours
tags: bash, timezones
---

I always struggle trying to convert GMT time to EST or EDT especially in 24 hour format. It's even harder when I'm staring at a log file trying to find the root cause of an issue. 

I wrote this bash alias to output the last 24 hours of time in both local and GMT. I find I'm using it all of the time now. Since it's an alias, I can easily run it from a Terminal window or within VSCode.

Here is the script:
```bash
gmt(){

for i in {-24..-1}
do
    est=$(date -v${i}H)
    gmt=$(date -u -v${i}H)
    echo "$i	$est	$gmt"
done
est=$(date)
gmt=$(date -u)
echo "0	$est	$gmt"

}
```

Here is sample output:
```
-24     Sun Feb 16 08:49:05 EST 2020    Sun Feb 16 13:49:05 UTC 2020
-23     Sun Feb 16 09:49:05 EST 2020    Sun Feb 16 14:49:05 UTC 2020
-22     Sun Feb 16 10:49:05 EST 2020    Sun Feb 16 15:49:05 UTC 2020
-21     Sun Feb 16 11:49:05 EST 2020    Sun Feb 16 16:49:05 UTC 2020
-20     Sun Feb 16 12:49:05 EST 2020    Sun Feb 16 17:49:05 UTC 2020
-19     Sun Feb 16 13:49:05 EST 2020    Sun Feb 16 18:49:05 UTC 2020
-18     Sun Feb 16 14:49:05 EST 2020    Sun Feb 16 19:49:05 UTC 2020
-17     Sun Feb 16 15:49:05 EST 2020    Sun Feb 16 20:49:05 UTC 2020
-16     Sun Feb 16 16:49:05 EST 2020    Sun Feb 16 21:49:05 UTC 2020
-15     Sun Feb 16 17:49:05 EST 2020    Sun Feb 16 22:49:05 UTC 2020
-14     Sun Feb 16 18:49:05 EST 2020    Sun Feb 16 23:49:05 UTC 2020
-13     Sun Feb 16 19:49:05 EST 2020    Mon Feb 17 00:49:05 UTC 2020
-12     Sun Feb 16 20:49:05 EST 2020    Mon Feb 17 01:49:05 UTC 2020
-11     Sun Feb 16 21:49:05 EST 2020    Mon Feb 17 02:49:05 UTC 2020
-10     Sun Feb 16 22:49:05 EST 2020    Mon Feb 17 03:49:05 UTC 2020
-9      Sun Feb 16 23:49:05 EST 2020    Mon Feb 17 04:49:05 UTC 2020
-8      Mon Feb 17 00:49:05 EST 2020    Mon Feb 17 05:49:05 UTC 2020
-7      Mon Feb 17 01:49:05 EST 2020    Mon Feb 17 06:49:05 UTC 2020
-6      Mon Feb 17 02:49:05 EST 2020    Mon Feb 17 07:49:05 UTC 2020
-5      Mon Feb 17 03:49:05 EST 2020    Mon Feb 17 08:49:05 UTC 2020
-4      Mon Feb 17 04:49:05 EST 2020    Mon Feb 17 09:49:05 UTC 2020
-3      Mon Feb 17 05:49:05 EST 2020    Mon Feb 17 10:49:05 UTC 2020
-2      Mon Feb 17 06:49:05 EST 2020    Mon Feb 17 11:49:05 UTC 2020
-1      Mon Feb 17 07:49:05 EST 2020    Mon Feb 17 12:49:05 UTC 2020
0       Mon Feb 17 08:49:05 EST 2020    Mon Feb 17 13:49:05 UTC 2020
```
Responsive Web Design Without Media Queries
Tags: webdev, css, html, beginners
Published: 2020-02-17 14:14:31

This video will take a look at using CSS and HTML without using @media to create responsive websites that dynamically update. 
{% youtube -TTBCxEBbfQ%}
In this video I cover:
* Resizing fonts using view width
* Adding minimum and maximum font sizing and calculations
* Creating resizable containers/imagesusing view height
* Using basic flexbox to ensure items fit and also wrap

## Follow and support me: 
Special thanks if you subscribe to my channel :)
* [Youtube](https://www.youtube.com/channel/UCvM5YYWwfLwpcQgbRr68JLQ?sub_confirmation=1)
* [Patreon](https://www.patreon.com/adriantwarog)
* [Twitter](https://twitter.com/twarogadrian)

## Want to see more:
I will try to post new great content every day. Here are the latest items:
* [Full Tutorial on how to use SASS to improve your CSS](https://dev.to/adriantwarog/full-tutorial-on-how-to-use-sass-to-improve-your-css-57on)
* [4 Simple CSS Hover Transitions for your Elements Background](https://dev.to/adriantwarog/4-simple-css-hover-transitions-for-your-elements-background-4mlg)
* [How to implement Dark Mode with CSS new media call: prefers-color-scheme](https://dev.to/adriantwarog/how-to-implement-dark-mode-with-css-new-media-call-prefers-color-scheme-3h65)
* [Creating a Mobile Design and Developing it](https://dev.to/adriantwarog/creating-a-mobile-design-and-developing-it-5c4o)
Using BetterTouchTool as a window manager
Tags: productivity
Published: 2020-02-17 14:10:51

In this short post, I'd like to share how I use [BetterTouchTool](https://folivora.ai) in my daily work. 

Here's a screenshot of my shortcuts.

![settings](https://freek.dev/uploads/media/better-touch-tool/settings.png)

Let's explain those. BetterTouchTool can resize your windows. I've got a couple of shortcuts set up that can immediately resize a window to the half size of the screen, or to use a quadrant. Using those shortcuts, I can very quickly organize windows, so they line up perfectly.

![Half](https://freek.dev/uploads/media/better-touch-tool/half.png)

![Quadrant](https://freek.dev/uploads/media/better-touch-tool/quadrant.png)

In the screenshots above, you'll also notice that I've set up MacOS to hide the menu and Dock by default. Doing so saves some precious screen estate, and I highly recommend you to do so.

While working, I often listen to music. Using BetterTouchTool, I can press F14 and F15 to control the volume from within any app. If you want to do this too, make sure to check the "Bring App to front before sending" and "Immediately switch back after sending" checkboxes.

If you want to use the same shortcuts as a do, import [this settings file](https://freek.dev/uploads/media/better-touch-tool/Triggers.bttpreset) which contains all my shortcuts.
system monitoring and the three bears
Tags: discuss, sysadmin, perfmon
Published: 2020-02-17 14:09:52

too light ?
* htop
* iperf
* ntop
* https://openhardwaremonitor.org/downloads/
* sar

too heavy ?
* cacti
* https://icinga.com/products/icinga-2/
* nagios
* https://prometheus.io/
* webmin
* zabbix

what should free libre open source app should goldilocks choose in 2020 ?

NOTE my orig 2016 post !
* https://fsse8info.wordpress.com/2016/02/14/sysadmin-server-monitoring-with-cactiganglia-and-xymona/

my guess is that these have died off now
How to Fix Webroot activate Error Code FZLC0056?
Published: 2020-02-17 13:52:02

Are you facing any error messages when installing Webroot.com/safe on Mac, Windows or PC? If yes, just type multiple times characters likewise i/a, o/0, s/5 and b/. If you are trying to get each letter to the number, you type just get a secure character in both methods. When you are trying to install an email just copy, paste the keycode directly into the installer. You have to copy/paste the keycode with full keycode covering mouse, right-click selection. 

Below are the methods which you should follow while working with Webroot Antivirus: -
•	If you want to install the Webroot.com from an email, simply copy and paste the keywords directly into the browser. 
•	Are you looking to copy/paste the keycode and highlights for full keycode.
•	Just right-click with the selection and copy from context menu when needed for keycode.
•	Place up the cursor in keycode entry box and right click from context menu option.

Are you having a previous version of Webroot.com/safe antivirus installed? This can be due to looking for the blocking installation of new software. Now click for few minutes when seeing error messages the keycode cannot be verified at the same time. You have to be assure for the Webroot.com/safe that is connected to the Internet.

Do you face any error for FZLC0055?
Do you face any error like Webroot.com/safe FZLC0056?

Still, you are not able to correct the download for Webroot.com/safe activate? Just request to have current download file and send keycode through email. You have to fill out the form when purchased the best buy just click here to download webroot.com/safe FZL00057.

How to solve error with Webroot.com/safe?

Do you type the keycode appropriately? Multiple times the characters likewise i/1, o/0, s/5 and much more are there for confused user type codes. If you want to get right app for your keycode, just avail Webroot Secure Anywhere Internet Security that is needed to install security free app from the store.
For the Webroot Premier Subscriptions, you must install the Premier App if you don’t have a Premier keycode just install the security free and install Webroot. Click here to submit a post with Webroot.com/safe.



How to re-install Webroot.com/safe with Us?
When the installation of the Webroot Antivirus Program is completed just follow the steps and re-install it again for the browser.
•	Tap to open your favorite browser.
•	Just type website in URL tab and Webroot Page will be opened.
•	Tap to Sign in the Tab and Enter login credentials to continue the process.
•	Just follow on-screen instructions to install, activate and download Webroot.com/activate 

                    Dial +1-855-725-3249 Toll Free

                  Click:-https://www.webrootsafe.me/
Webroot Geek Squad- Webroot Keycode Activation 
Published: 2020-02-17 13:49:29

How to create a Webroot Geek Squad Account?
•	Tap to open the web browser and open an official URL for navigating on same project of Webroot Antivirus.
•	When the page opens just hold on, “My Account” options.
•	In case, you don’t see the option hold, “For Home” or “For Business”.
•	You can also see the My Account and tap after for next option.
•	When you have installed Webroot geek squad login page.
•	Tap on Create account option.
•	The registration page provides up with important details which you don’t want to complete in the field of security questions.
•	Moreover, one can also receive a confirmation code on email from Webroot Antivirus.
•	Congratulations! You are ready to use the Webroot Geek Squad Services.
Thanks, your account has been successfully entitled with a free Webroot Trial or Paid Versions.


How to Buy Webroot Keycode Activation Code?
•	Firstly, tap to the official site of Webroot Antivirus Website.
•	Tap to My Account and complete the Sign-in procedure.
•	After this select a category from the profile,” For Home & Office”
•	You can also choose the category,” For Business & Partners.
•	Tap on the option to say,” Buy Products”.
•	The customers also wish to use the trial version of Webroot Antivirus where you only must start with,” Trial Button”.
•	Input all important details for your browser and also receive an email covering keys when activated the software.
•	Are you an expert to grab the process for Webroot Geek Squad?
•	You can come across to activate Webroot Key Code Activation.

What are the most common Webroot Error Messages?
•	Webroot Antivirus Error Messages arises up with different error codes/messages.
•	You can come across with a message saying,” Webroot Keycode Activation”.
•	You are unable to find the Webroot Antivirus on the Computer.
•	Webroot Error Code 10 and other codes.
For more information just feel free to ask any queries for Webroot Antivirus or call Webroot Geek Sqaud.

                   Dial +1-855-725-3249 Toll Free

              Click:-https://www.webrootsafe.me/
Catching Lodash Methods with Linting
Tags: discuss
Published: 2020-02-17 13:38:44

Hello awesome Dev.to-ers! I am working on a project with a team that has used lodash in the past to access some methods that can transform/manipulate arrays. Now that some of these methods are a part of native JS, there isn't really a need for lodash methods like .filter, .map, .reduce, .concat, .findIndex, etc. 

So my question to anyone that's willing to answer is, is there a way to configure the linter to catch the use of those unnecessary lodash methods?
React: Create component inside a component (?)
Tags: react, class, hooks, component
Published: 2020-02-17 13:25:29

---
title: React: Create component inside a component (?)
published: true
description: About local components inside a React class and function
tags: React, class, hooks, component
---

I recently observed one issue in my component rendering. Consider this code
```javascript
const App = () => {
const [search, setSearch] = useState('');

const Users = ()=>  <UserList pattern={search}/>;

return (
    <div id="app" className="home-page">
      <Header />
      <WelcomeSlogan/>
      <Users/>
    </div>
  );
}
```
Here, the 'Users' component is re-rendering whole list whenever the search string changes. This is because in functional component, whole function body gets execute again (except hooks part) whenever local state (search) changes. What we want is only unmatched items to be removed from list. So the simple fix is to not create a component inside functional component. 
Using ```<UserList pattern={search}/>```
directly inside return will fix our issue. 
```javascript
return (
    <div id="app" className="home-page">
      <Header />
      <WelcomeSlogan/>
      <UserList pattern={search}/>
    </div>
  );
```
So the take away - NEVER CREATE A COMPONENT INSIDE ANOTHER FUNCTION COMPONENT.

However, this is not true in case of react class components. Since only render() method gets executed when re-rendering, we can create other (functional) components inside a class component. Like below:

```javascript
class App extends React.Component {
constructor(props) {
      super(props);
      this.state = {
          search: ''
      }
      ...
  }
getUserList() {...} // returns List based on this.state.search
getComponent() {...} //create component here. returns UI element(s)

render() {
  return(
   <div> 
     {getUserList() }
     <div> { getComponent() } </div>
   </div>)
}
```
This however works well. The getUserList component does not re-render whole list when search changes. Which is desired behavior. This might be because:

1. Functions are not part of class instance.
2. Only render function gets called when component re-render.

Hence, I think, IT's OK TO CREATE FUNCTIONAL COMPONENTS INSIDE A CLASS COMPONENT(?).

This was a good lesson for me and I can say I understand JS and React a bit better than before. (Feel free to add/correct me in comment section)

Thanks All.
what can you do if the archive.org waybackmachine doesnt go wayback enough ?
Tags: watercooler, history, archive, electronics
Published: 2020-02-17 13:03:50

what can you do if the [archive.org waybackmachine](https://web.archive.org/web/20080701000000*/http://www.epemag3.com/)  doesnt go wayback enough ? for example archive.org only has frontpages of [practical electronics](http://www.epemag3.com/) as far back as 2008 

well [rewindmuseum](https://www.rewindmuseum.com/electronicsmagazines.htm) to the rescue !

they have [practical electronics] frontpages and branding all the way back to 1965 !

https://www.pinterest.co.uk/pin/211176670017007318/
https://www.pinterest.co.uk/pin/211176670017007320/

CELEBRATING 50 YEARS OF PE !

Practical Electronics *are very proud of our heritage, having built the post-war hobby electronics market in Britain from scratch. In the November and December 2014 issues we celebrated our 50th birthday. PE's Alan Winstanley wrote this two-part special article describing the origins of Practical Electronics magazine in the UK, followed by the arrival of its litte sister Everyday Electronics.*

http://www.epemag3.com/lib/common/50_Years_of_EPE_Part1.pdf
http://www.epemag3.com/lib/common/50_Years_of_EPE_Part2.pdf
How to communicate with non-programmers
Tags: todayilearned, career, beginners
Published: 2020-02-17 13:00:12

*TL;DR notes from two articles I read today.*

### [Words are hard - an essay on communicating with non-programmers](http://bit.ly/2SRhgJ7)

- Remember communication is complete when you are understood and not when you have said what you had to say. When communicating with people outside of the programming world, stay away from using technical jargon. It can make people feel excluded and it can confuse them. 
- It’s often necessary to simplify things. Be respectful, and never condescending, while doing that. Try explaining things in a step by step fashion, mention what edge cases are you considering with an example or two, and present a generalised gist. 
- Before an important meeting with non-technical stakeholders, work with a non-technical person as a sounding board to help you see if you’re making sense to your audience.
- Try to personify or use analogies when explaining yourself. Use visual analogies - draw diagrams, tables, charts, flowcharts and the like to help illustrate your points.
- When explaining performance metrics, find a middle ground between accuracy and understandability. 

*[Full post here](http://bit.ly/2SRhgJ7), 14 mins read*

---

### [How to improve a legacy codebase](http://bit.ly/2u3ZTwq)

- Begin with a backup - copy everything to a safe place in read-only mode. And check if the codebase has a build process and that it actually produces what runs in production.
- Freeze the DB schema until you are done with the first level of improvements. It allows you to compare the effect your new business logic code has compared to the old business logic code.
- When adding instrumentation to the old platform in a completely new database table, add a simple counter for every event and a single function to increment these counters based on the name of the event. 
- Never try improving both the maintainability of the code or the platform it runs on at the same time as adding new features or fixing bugs. It will invalidate some of the tests you made earlier.
- When migrating to a new platform, all business logic and interdependencies should remain exactly the same as before.
- Test the new DB with the new code and all the tests in place to ensure your migration goes off without a hitch.

*[Full post here](http://bit.ly/2u3ZTwq), 11 mins read*

---

*[Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post08&utm_campaign=is)*
Daily Developer Jokes - Monday, Feb 17, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-02-17 13:00:09

---
title: "Daily Developer Jokes - Monday, Feb 17, 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%20Feb%2017%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/5e12589f412c5.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:___ Why did the angry function exceed the callstack size?

___A:___ It got into an Argument with itself
 -->
Mobile App Marketing Trends That Will Make It Big in 2020
Tags: android, ios, devops, startup
Published: 2020-02-17 12:14:36

Today, when you think about any basic activities that human beings require on a regular basis, there are apps that perform the job. There are apps for booking cabs, booking household services, finding your date, ordering food and grocery, managing your finances, and even finding companions based on your mutual hatred for things!

In this tech-world where the count of mobile apps is quite saturated, apparently, there is a need for mobile app marketing with utmost efficiency. Properly marketing your mobile apps not only ensures good download numbers but also better penetration in the right markets. Choosing the right mobile app marketing company makes a massive difference to your brand and revenue. It is to be ensured that the mobile app marketing strategies are up-to-date and in line with the business philosophy of your app.

There are a few astounding numbers that talk about mobile apps, their growth, and the general transition to embracing the digital realm in marketing.

44% of businesses have already migrated to digital being the primary mode of marketing.

According to Seagate, more than 66% of the global CEOs started focusing on digital strategies to enhance their customer experience.

34% of the companies have already undergone a digital transformation and it is interesting to note that some of these companies are more than a century old.

More than 50% of the CEOs across the globe have agreed that digital improvements have resulted in a direct increase in their revenue.

As mentioned earlier, there is a growing need for marketing your mobile app. However, as much as technology, marketing is evolving as well. Therefore, it is important to stay ahead in the game and watch out for the trends of the future when it comes to marketing, especially on the mobile app front. 

Read Full Article:https://www.inoru.com/blog/mobile-app-marketing-trends-that-will-make-it-big-in-2020/
O Twitcode saiu do ar
Tags: twitcode, php
Published: 2020-02-17 12:14:35

Devido ao baixo número de usuários registrados o site https://twitcode.com foi encerrado hoje, dia 17 de fevereiro de 2020. 

Não estou certo sobre qual será o futuro do site, porém não descarto a possibilidade de colocá-lo novamente no ar em algum momento no futuro.
HP LaserJet Pro MFP M148DW Wireless Setup and installation
Published: 2020-02-17 12:13:57

Refer HP Laserjet Pro manual to get an idea of setup and installation. It’s better to read and understand <b><a href="https://www.123hpcomm.com/hp-laserjet-pro-mfp-m148dw-setup-and-driver-download/">HP LaserJet Pro MFP M148DW Setup</a></b> guidelines 

• Remove the protective tapes that surround the printer
• Find the port to connect the cables
• Switch the device ON 
• Set the language and display
• Load the paper into the paper input tray
• Insert the cartridge 
• Move to the network settings
• Select the connection type.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lgrn06wjmqytoau7dgdv.jpg)

<b></h2> Wireless setup wizard instructions:</h2></b>

• If you prefer wireless setup wizard, select and answer the guidelines one by 
  one
• Now it’s time to update the matching software
• Move to the software and driver download page
• Type the device name and version( mac and windows)
• You can view the software search results
• Select and extract the  setup file to the required folder 
• Error messages can popup. You can identify the reason and cause of the error 
• Start printing and it’s good to print a test page and confirm the settings 
  
<b></h3>Troubleshooting HP LaserJet Pro MFP M148DW Setup issues and errors:</h3></b>
• Check the network speed
• The validity of the software
• Restart your device  once
• Refer the device manual to get an idea of the instructions
• Print a test document and network test page to confirm the settings
• You can replace the device with a new one. Device reviews can help
• If it’s a printing issue, confirm that there is no jammed paper stuck inside
• To avoid scan errors, check the scanning software

Do you need any further support and guidance,visit our site <a href="https://www.123hpcomm.com
">123.hp.com/setup</a> or contact us at <b> +1-866-219-1890</b>