teleren/devto huggingface dataset:
React Virtuoso - an elegant virtual list component

Tags: react
Published: 2019-05-14 09:08:32

Hey everyone, 

after some struggle with large data sets, i decided to scratch my own itch and build a proper component that can display variable height items without much hassle - [React Virtuoso](https://github.com/petyosi/react-virtuoso). Please let me know what you think about the implementation and the feature set. 


a few interesting details:

- the component is written in typescript, and uses the [tsdx scaffold](https://github.com/palmerhq/tsdx).

- the internal state is [implemented with rxjs](https://github.com/petyosi/react-virtuoso/blob/master/src/virtuosostore.tsx). propagating the observables changes works quite well with the hooks api.
Using keyboard-shortcuts with zsh
Tags: zsh, shortcuts, terminal, linux
Published: 2019-05-14 08:35:18

---
title: Using keyboard-shortcuts with zsh
published: true
description: How to use keyboard shortcuts within zsh to run commands.
tags: zsh,shortcuts,terminal,linux
series: zsh-keyboard-shortcuts
---

Are you a zsh user? Do you like to tweak your shell to the maxium in order to gain a bit of time here or there? You might be in the right place here.

This post will show you how to use keyboard shortcuts within zsh to run common commands.

![gif showing how to use the shortcut to run git pull](https://thepracticaldev.s3.amazonaws.com/i/i1hpfsuya5k7i907bdxa.gif)

## git pull using a keyboard shortcut

In this example we want to run `git pull` with the shortcut `ctrl-g+p` (meaning `ctrl-g` - releasing `g` - pressing `p`) as seen in the gif above.

We define our shortcuts in the zsh ressource file. It's normally called `.zshrc` and we find it within our home directory. I use visual studio code to edit the file:

`code ~/.zshrc`

Add the following content to the file:
```bash
# git pull (ctrl-g+p)
function gitpull() { echo "git pull"; git pull; zle reset-prompt; zle redisplay}
zle -N gitpull
bindkey '^gp' gitpull
```

**Lets break it down line-by-line**

1. A nice comment
2. We define the function gitpull which we use for our keybinding later. The function does:
    1. Write out the command we send. (I like this over having an empty screen doing something)
    2. Runs `git pull`
    3. Resets our prompt. (This is useful, if we have git information in our prompt, as they are not updated if we don't use `reset-prompt`)
    4. Redisplays our prompt
3. We define a widget that points to the function
4. We bind our key-combination to the widget

That's it. Let me know if it works for you. If there is some interest in this kind of stuff, I could follow up with an example of how to pass an argument to a keyboard shortcut. I for example use this option to create feature branches by doing:

`typing the name of the feature branch --> ctrl-g+f`

![gif showing how to use the shortcut to create a feature branch](https://thepracticaldev.s3.amazonaws.com/i/hreonc5xmyqo3b15t5xd.gif)

## Bonus

Some more shortcut definition examples also using `alt` as the modifier to get you started:

```
'^g'   # ctrl-g
'^gp'  # ctrl-g and then p (as shown in the example)
'^[x'  # alt-x
'^[xc' # alt-x and then c
```
    
## ❤️ Let's connect!
I would love to grow my network with other tech enthusiasts. Let's connect here or over on twitter! [👋 @langhard](https://twitter.com/langhard) 

## Resources

[A User's Guide to the Z-Shell](http://zsh.sourceforge.net/Guide/zshguide04.html)

## Update
Part 2 - [Passing a parameter to a zsh keyboard-shortcut](https://dev.to/ecologic/passing-a-parameter-to-a-zsh-keyboard-shortcut-1877) - is now online.
A Universal Document Conversion API for Java
Tags: documentconversion, groupdocs, wordtopdf
Published: 2019-05-14 08:24:39

---
title: A Universal Document Conversion API for Java
published: true
description: 
tags: C#, DocumentConversion, GroupDocs, WordToPdf
---

You might be looking for a solution to add watermark or rotate pages while converting a document. GroupDocs.Conversion for Java [API](https://products.groupdocs.com/conversion/java) allows you to do so. It supports back and forth conversion of multitude of file [formats](https://docs.groupdocs.com/display/conversionjava/Supported+Document+Formats). In this post we will see conversion to PDF and image formats. You must try open-source example [project](https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-Java) or if interested in a web application, visit [this](https://products.groupdocs.app/conversion).
First of all lets see basic conversion code:
{% gist https://gist.github.com/GroupDocsGists/8366005afb98cc8ac2a2ef4376b90cd6 %}
And now lets explore PdfSaveOptions, following code elaborates how to add watermark.
{% gist https://gist.github.com/GroupDocsGists/4f926bfba1329e8976d47634a358a3f3 %}
And how to add page rotate option.
{% gist https://gist.github.com/GroupDocsGists/57d87277c81c76f299bcdddc2f9f0b33 %}
This is how you do conversion to image format.
{% gist https://gist.github.com/GroupDocsGists/15bd369621df87ff06292011aec26e3c %}
Support of rotation.
{% gist https://gist.github.com/GroupDocsGists/670d316b8a3c1cbe4bed47c0bbb6b8fd %}
Lean in with your ears
Tags: dailywriting
Published: 2019-05-14 18:00:53

---
title: Lean in with your ears
published: true
tags: daily-writing
canonical_url: https://marcusblankenship.com/lean-in-with-your-ears/
---

We were trying to solve a problem, but we’re going in circles – generating ideas faster than we could consider them.

It was like twelve people playing a game of chess.

Some people retracted into the shadows; others advanced into the light.

Alliances formed around ideas, advancing them and then defending them.

Many times I tried to help the group get back on track, yet my attempts failed.

Defeated, I retracted, sitting in silence.

On the outside, I appeared disconnected, but inside I was in turmoil.

Finally, we called for a vote on a high-level idea.

The voting rules are simple:

- thumbs-up means “I support the idea.”
- thumbs-down means “I oppose the idea.”
- side-thumb means “I will go along with the group’s decision.”

For the first time, I voted side-thumb.

## The realization of side-thumb

As we broke for a bio-break, my friend Jack fell in step next to me. When I shook my head in frustration with the team, he looked surprised.

_“Oh, I saw you voted side-thumb. Since you’ll go along with the group, do you even need to be in the next part of the meeting?”_

In a flash, I realized he was right.

If I said I’d go along with the group, maybe I wasn’t needed for the rest of the discussion.

Maybe I’d been making the work more difficult because I’d been trying to give input on something I didn’t care about.

Why would I do this? Probably because I want to impress people, feel that I have good ideas about most topics, and have a habit of speaking up.

I took Jack’s advice and skipped out on the lunch session.

When I returned, I found the group had made great progress _without me_.

Truthfully, this stung a little.

Turns out that not only didn’t they need me, but I was also getting in the way.

## Is this hard for you, too?

Are you in the habit of offering ideas in most situations, even if you don’t care about the outcome?

Maybe you don’t have to – perhaps it’s actually getting in the way.

I’m going to try listening more, talking less, and observing more carefully.

**Not disengaging, but leaning into the discussion with my ears, not my mouth.**

Maybe I can help more by using only 10% of the words.

Or, with none at all.

It’s worth a think, eh?

The post [Lean in with your ears](https://marcusblankenship.com/lean-in-with-your-ears/) appeared first on [Marcus Blankenship](https://marcusblankenship.com).
Solved-Printing Error Object in Winston.
Tags: winstonloggerfix, deepclone
Published: 2019-05-14 06:45:30

---
title: Solved-Printing Error Object in Winston.
published: true
description: https://github.com/Atishay96/utils-deep-clone, I've published this package to solve Winston logging error issue. I've given some examples to get you started. Let me know if you guys like it. P.S. I didn't do it in Winston itself is because i believe it's a dead project
tags: winston-logger-fix, deep-clone
---
Docker Tips&Tricks
Tags: docker, tips
Published: 2019-05-14 06:04:31

---
title: Docker Tips&Tricks
published: true
description: A few Docker tips I picked up along the way
tags: docker, tips
---

Hey, I would like to share with the community a short article in which I go through a few Docker tips I picked up in the last 2+ years of working with Docker.
The article has been originally posted on my blog at: https://webthoughts.koderhut.eu/docker-tips-tricks-748cf6281bc3

Since I know this is a very helpful community I would love your feedback on the article itself and its contents.
Cómo obtener la versión de WordPress desde un plugin
Tags: api, plugin, versión
Published: 2019-05-21 07:58:25

---
title: Cómo obtener la versión de WordPress desde un plugin
published: true
tags: API,plugin,versión
canonical_url: https://kungfupress.com/como-obtener-la-version-de-wordpress-desde-un-plugin/
---

Para obtener la versión de WordPress puedes usar la función `get_bloginfo('version')` que te devuelve el número de versión, ejemplo: **5.2**

Evidentemente esta función es útil, simplemente, para mostrar esta información a nuestros usuarios en un momento dado, sobre todo a editores o administradores del sitio.

Otro uso puede ser el de variar el comportamiento del plugin que estás desarrollando en función de la versión de WordPress actual. Para ello puedes usar la función `version_compare` que tiene precisamente esta misión. Esta función admite tres parámetros: los dos números de versiones que necesitas comparar y el operador de comparación que quieres usar.

En el siguiente ejemplo puedes ver estas dos funciones en acción en un pequeño plugin de usar y tirar.

El plugin muestra el número de versión actual como un elemento del menú de administración de WordPress, al pulsar sobre este nos mostrará una pequeña frase que varía en función de que la versión actual sea menor a la 5.0.

```
<?php
/**
 * Plugin Name: KFP Version WP
 * Author: Tonio Ruiz
 */
 
add_action("admin_menu", "Kfp_Vwp_Admin_menu");
 
function Kfp_Verwp_Admin_menu()
{
    add_menu_page(
        'Versión WordPress ', 'Wordpress ' . get_bloginfo('version'), 
        'manage_options', 'kfp_vwp_admin', 'Kfp_Vwp_admin', 'dashicons-wordpress'
    );
}
 
function Kfp_Vwp_admin()
{
    if (version_compare(get_bloginfo('version'), '5.0', '<')) {
        echo "<h3>Soy un WordPress " . get_bloginfo('version') 
        . " pregutemberiano</h3>";
    } else {
        echo "<h3>Soy un WordPress " . get_bloginfo('version') 
        . " con todo su Gutemberg</h3>";
    }
}
```

Por cierto la función `get_blog_info( )` tiene muchas más utilidades: nombre del sitio, descripción, correo del administrador, url del sitio, etc. Puedes [verlas todas en la referencia de WordPress](https://developer.wordpress.org/reference/functions/get_bloginfo/).
How to check adb version in react native application development
Tags: android, ios, reactnative, javascript
Published: 2019-05-14 05:00:43

---
title: How to check adb version in react native application development
published: true
description: How to check adb version in react native application development
tags: #android #ios #reactnative #js
---

Source : <a href="https://www.skptricks.com/2019/05/how-to-check-adb-version-in-react-native.html" > How to check adb version in react native application development</a>

This tutorial explains how to check adb version while designing android application in react native platform. For your information ADB is refer as Android Debug Bridge (ADB). The Android Debug Bridge (ADB) is a client-server program used in Android application development. The Android Debug-Bridge is part of the Android SDK and is made up of three components: a client, a daemon, and a server. It is used to manage either an emulator instance or an actual Android device.

<img src="https://1.bp.blogspot.com/-15JGGHBShik/XNe1pQfhM0I/AAAAAAAACxw/tT-NyTCUAvE-hyMBja2faeMiJwuWeX8vgCLcBGAs/s400/how-to-check-adb-version-in-react-native.jpg" />


<a href="https://www.skptricks.com/2019/05/how-to-check-adb-version-in-react-native.html" > Continue Reading...</a>
How do you evaluate a software framework?
Tags: discuss
Published: 2019-05-13 19:38:02

---
title: How do you evaluate a software framework?
published: true
description: How do you pick a software framework from a sea of options?
tags: #discuss
---

We do a lot of reading and testing to compare multiple frameworks available in the market when you are starting a project. I wanted to share my methods and hope to learn what other software devs do.

## My methodology

1. Time box general research and list two to three frameworks/libraries that I want to try.

2. Try to solve the most complex problem in the requirement with the items selected in step 1. Timebox this step as well. How much you can solve with a same amount of time is also a good indicator of how easy it is to use a selected software.

3. Fill out the rubric for each and compare them after giving myself a day break after the research.

## Framework Evaluation Rubric
1. What is the fundamental problem it is solving?

2. How intrusive/opinionated is it?

3. Can I abstract it away so that my code can be protected from framework specific leakage?

4. What is the cost of changing my mind later?

5. What is the philosophy of extensions? How easy or difficult it is to write extensions?

6. Maturity, community, activeness and open bugs


Do you have a rubric to compare the characteristics that are important to you?



Thanks [Karthikkannan](https://github.com/codespider) for giving me the outline.
Create Simple Calculator Using JQuery, HTML And CSS
Tags: webdev, html, javascript, css
Published: 2019-05-14 04:58:02

---
title: Create Simple Calculator Using JQuery, HTML And CSS
published: true
description: Create Simple Calculator Using JQuery, HTML And CSS
tags: #webdev #html #js #css
---

Source : <a href="https://www.skptricks.com/2019/05/create-simple-calculator-using-jquery-html-css.html" >Create Simple Calculator using JQuery, HTML and CSS </a>

This tutorial explains how to create simple calculator application using jquery, html and css. Making a calculator in JavaScript is not have been taught so far.As it supports mathematical calculations. With the help of JQuery, HTML and CSS we can build few tiny applications which run completely inside the browser. Today in this tutorial I am going to show you how to create a simple calculator using JQuery with the help of HTML and CSS. Using this calculator we can perform basic arithmetic operations.

<img src="https://1.bp.blogspot.com/-su0q4tkVOJM/XMl9_Oe6jyI/AAAAAAAACw0/ncSX66IVCpEFRk4yQf5u0_nsM-TpLINDQCLcBGAs/s400/a1.PNG"/>


<a href="https://www.skptricks.com/2019/05/create-simple-calculator-using-jquery-html-css.html" >Click here to read more... </a>
Jquery Duplicate Fields Form Submit with PHP
Tags: javascript, jquery, html, webdev
Published: 2019-05-14 04:56:50

---
title: Jquery Duplicate Fields Form Submit with PHP
published: true
description: query Duplicate Fields Form Submit with PHP
tags: #js #jquery #html #webdev
---

Source  : <a href="https://www.skptricks.com/2019/05/jquery-duplicate-fields-form-submit-with-php.html" > Jquery Duplicate Fields Form Submit with PHP</a>

This tutorial explains How to submit jquery duplicate/clone field values to form with PHP.  In this example we are going to provide very simple example and using existing jquery plugin, so here we are using relCopy.js jquery plugin to duplicating the existing field.

<img src="https://4.bp.blogspot.com/-gs1AI8lI9YI/XMk_HoM24iI/AAAAAAAACwo/gnTLfLAMBcU8i2pA2A_gKxgwk4W-3QfvQCLcBGAs/s400/a1.PNG" />

{% youtube n-d-ihUWjwc %}


<a href="https://www.skptricks.com/2019/05/jquery-duplicate-fields-form-submit-with-php.html" > Click here to read more</a>
Show different Images on Android and iOS devices using same Code in React Native
Tags: reactnative, android, ios, javascript
Published: 2019-05-14 04:53:34

---
title: Show different Images on Android and iOS devices using same Code in React Native
published: true
description: Show different Images on Android and iOS devices using same Code in React Native
tags: #reactnative #android #ios #js
---

Source : <a href="https://www.skptricks.com/2019/04/show-different-images-on-android-and-ios-using-same-code.html" > Show different Images on Android and iOS devices using same Code in React Native</a>

This tutorial explains how to show different images on android and iOS devices using same code in react native application. Every developer wants to write code once and wants to use exact same code for different platform with exact same output and behavior, if he/she is working on cross platform apps like react native. It reduces the code in terms of complexity, length, enables developer to manage code easily, enhances the quality of code and make code easy to read and understand.

<img src="https://4.bp.blogspot.com/-Vw6_wWBMOTQ/XMiFnpZ0gyI/AAAAAAAACwA/LGPEL8GSqrUikN2BeQApiGe33l-o4LjlwCLcBGAs/s400/ii.jpg" alt="Show different Images on Android and iOS devices using same Code in React Native" />

<a href="https://www.skptricks.com/2019/04/show-different-images-on-android-and-ios-using-same-code.html" > Click here to see the demo...</a>
Time
Tags: devlog, writeas, coding
Published: 2019-06-21 15:50:05

---
title: Time
published: true
tags: devlog, writeas, coding
canonical_url: https://triptych.writeas.com/time?pk_campaign=rss-feed
---

Time is something you always seem to have enough of, before you are out of it. Take time today to rest, to think, and to be thankful.

Got a lot of work done at Work, but not much otherwise. Kinda frustrating.
A simple concise guide for Go in Chinese
Tags: go, simple, concise, guide
Published: 2019-05-14 03:48:04

---
title: A simple concise guide for Go in Chinese
published: true
description: 
tags: go, simple, concise, guide
---

Go is a simple language so we like simple guide. Here is one written in Chinese. You can read in one or two days. If you don't know Chinese you can ask help from Google translate.

[hello world](https://jiajunhuang.com/tutorial/golang/hello_world.md)
Just do The Thing
Tags: motivation, productivity, writing, creation
Published: 2019-05-14 02:28:09

---
title: Just do The Thing
published: true
description: We all procrastinate from time to time at varying degrees. Sometimes you just have to go do whatever it is that you're avoiding.
tags: motivation, productivity, writing, creation
cover_image: https://thepracticaldev.s3.amazonaws.com/i/m1j1j0d4hsnoein4r9ab.jpg
---

I don't know where [Joshua Fields Millburn](https://twitter.com/JFM) was inspired by his advice, but [Steven Pressfield](https://twitter.com/SPressfield), Nike, and he all have roughly the same thing to say: "Just do it."

![Shelly-Ann Fraser-Pryce dancing with the words "Just do it" moving with her](https://media.giphy.com/media/3o7TKPVo3SMEMMwISY/giphy.gif)

JFM said in *["How to Improve Your Writing: 3 Tips"](https://www.theminimalists.com/how-to-improve-writing/)*

> I didn’t become a writer until I developed a writing habit. People don’t learn how to write via osmosis; it takes work. So forget word count or page count, and don’t worry about creating the perfect writing space—focus instead on **sitting in the chair** [emphasis mine] distraction-free, writing for at least an hour a day. Do this for a month and you will improve more than you thought possible.

In *[The War of Art](https://www.amazon.com/War-Art-Steven-Pressfield-ebook/dp/B007A4SDCG/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr=)*, Pressfield talks about Resistance numerous factors surrounding it. I haven't gotten too deep in it yet, but Resistance is what we have to fight every time we want to do something meaningful. You could be avoiding doing The Thing out of fear, worry, sheer boredom, whatever. At the very beginning of his book, he says

> There's a secret that real writers know about that wannabe writers don't, and the secret is this: It's not the writing that's hard. What's hard is sitting down to write.

> What keeps us from sitting down is Resistance.

This is the 15th day of my 30-day blogging challenge, so I'm over halfway there. I have to agree that the hardest part about it all was sitting down to write and get started. There's always something to be distracted by: watching [Brooklyn Nine-Nine](https://twitter.com/nbcbrooklyn99) on Hulu, playing with my dog, scrolling through the Twitter, ...

But all of those things will be there *after* The Thing is done. You might also find that The Thing wasn't so bad or it didn't take as long as you thought it would. Just sit down and do it. You've got this!

![Jake Peralta excitedly giving Amy Santiago an encouraging thumbs up](https://media.giphy.com/media/d2ZeMUDQSSsCP9FC/giphy.gif)

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).

---

*[Image](https://unsplash.com/photos/9NI6PEGWxEc) by [GoaShape](https://unsplash.com/@goashape) on [Unsplash](https://unsplash.com).*
Big issues from simple things
Published: 2019-05-14 01:23:58

---
title: Big issues from simple things
published: true
description: Learning the hard way to invest the time in properly configuring your files. This is a short article about finding a years long problem was a simple fix. 
tags: 
---

## I feel a little weird admitting this 
Apparently I missed something really simple, I configured my nunjucks config file incorrectly. Not for a little bit, for the past 3 years! I combined info from a bunch of tutorials and mashed them all together to form my gulpfile that powered my gulp-nunjucks-render configuration.

When starting out this is really helpful to get a feel for how something should work, though eventually you should learn more about the code and make adjustments that are best for your needs. I never did that, I just made my peace with the fact I couldn't use relative paths and had no idea why I couldn't do that.

Now after all these years, deciding to upgrade to Gulp 4, deal with breaking changes from upgrading, and having to relearn everything about Gulp I've done before, I notice this. I'm not upset since everything is a learning experience. I'm more disappointed something as simple as changing the url from `'src/templates/'` to `'src/'` makes such a large difference.

I'll gladly have better control over my content and happily move my files back to more convenient places. Just another case of doing due diligence while coding. Don't forget to check in on your code every now and then.