teleren/devto huggingface dataset:
RxJS 6: What's new and what has changed?
Tags: javascript, rxjs, webdev, reactive
Published: 2018-04-30 15:35:37

---
title: RxJS 6: What's new and what has changed?
published: true
description: 
tags: #javascript #rxjs #webdev #reactive
canonical_url: https://auth0.com/blog/whats-new-in-rxjs-6/
---

RxJs 6 is out to provide developers with improvements in modularity, a boost in performance and easier to debug call stacks.


[Explore what the RxJS team has included and changed in this new release.](https://auth0.com/blog/whats-new-in-rxjs-6/?utm_source=dev&utm_medium=sc&utm_campaign=new_rxjs6)
Is coding with alcohol productive?
Tags: discuss, productivity, alcohol, vodka
Published: 2018-04-30 14:56:42

---
title: Is coding with alcohol productive?
published: true
description: 
tags: discuss, productivity, alcohol, vodka
---

I personally like to code with alcohol, especially Vodka🍸. With alcohol, I feel like I could do everything at once, and do a lot of work (at least in my memory). 

Many hackathons provide free alcohol, so I suppose we can improve our productivity in the short term. 

How do you think?
Storing Image File (binary) vs Image Base64 in Database
Tags: webdev, discuss, django
Published: 2018-04-30 12:55:02

---
title: Storing Image File (binary) vs Image Base64 in Database
published: true
description: At what point should I favor one over the other? Any performance issues? 
tags: webdev, discuss, django
---

Using frameworks like Django, the file is saved onto the harddrive, and a link pointing to the file is rather stored in the Database, which is fine.

In my current API approach for uploading content, I submit the form, the part where there are images using the standard form data posting (the usual `multipart/form-data`).

So I simply cook up a payload that mimics the usual form-data submit using Angular, then push to an endpoint that accepts the form data submission.

Recently, I'm thinking of going full base64 images.

As in,

 - User selects image to upload
 - Behind the scenes (on the browser), I encode the image to base64 string
 - User submits form, then the usual JSON payload is sent with the image field as base64

So something like:

```
{ data: 'string'
  image: 'base64 string'
}
```

I've done the base64 image approach some time ago, and it was great (at least to me).

Are there any performance issues with going with base64 image strings for storage in Database? Any caveats to look out for?
Magento 2 Product Attachments Extension    
Tags: magento2pdfupload, magento2fileupload, magento2filedownload
Published: 2018-04-30 12:34:23

---
title: Magento 2 Product Attachments Extension    
published: true
description: 
tags: Magento 2 PDF upload, Magento 2 file upload, Magento 2 file download, Magento 2 pdf upload
---

Magento 2 product attachments extension by FME allows you to enrich your product & CMS pages by attaching supporting files. It enables you to attach multiple file types such as PDF, PPT, Docs etc. for customers to download. These files can be user guides, tutorials, video links and other informative materials which contribute to increased product knowledge of the customers. It also lets you create a separate 'File Download' page to list all the uploaded files.

Extension for [Magento 2 product attachments] (https://marketplace.magento.com/fme-module-productattachments.html) allows you to display attractive file icons. You can set a download limit. In order to download a file, customers must be signed in. You can restrict uploaded files to specific customer group and store views. 

##Feature Highlights of Magento 2 File Upload Extension

Following are some features of Magento 2 file upload extension.

- Upload PDF & other unlimited file types
- Create separate 'File Download' page
- Display attractive file icons
- Restrict files by customer groups & store view
- Set a download limit
- Login before download
Use babel-eslint for code using not standardized specifications
Tags: javascript, beginners
Published: 2018-04-30 04:05:32

---
title: Use babel-eslint for code using not standardized specifications
published: true
description: Use babel-eslint for code using not standardized specifications
tags: javascript,beginners,
---

## Parsing error on ESLint

While writing code for [review-waiting-list-bot](https://github.com/ohbarye/review-waiting-list-bot), I came across the following `Parsing error` on `eslint`.

```shell
$ eslint .

/Users/ohbarye/.ghq/github.com/ohbarye/review-waiting-list-bot/src/App.js
  19:21  error  Parsing error: Unexpected token ..

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.
```

The cause seemed due to code using not standardized specifications like below. Yeah, [Object Rest/Spread Properties](https://github.com/tc39/proposal-object-rest-spread) is obviously still at stage 3 (as of 2018-04-30). 

```javascript
const { authors, ...conditions } = { authors: [], owner: '', repo: '' }
```

Besides, eslint officially says that the default eslint parser SHOULD behave so.

ref: https://github.com/eslint/eslint/issues/6693

## babel-eslint

When we'd like to use _stage n_ specification, we need to use [babel-eslint](https://github.com/babel/babel-eslint).

First, let's add it as a devDependency.

```shell
yarn add -D babel-eslint
```

Then, specify a parser in `.eslintrc.json`.

```js
# .eslintrc.json
{
  "parser": "babel-eslint",
  ...
}
```

Now I could meet the sparkle again. ✨

```
$ eslint .
✨  Done in 1.45s.
```

## Environment

- yarn v1.6.0
- Node v8.3.0
- eslint v4.4.1
- babel-eslint v8.2.3
Five use cases where a npm private proxy fits in your workflow
Tags: yarn, npm, node, javascript
Published: 2019-02-13 16:03:36

---
title: Five use cases where a npm private proxy fits in your workflow
published: true
tags: yarn,npm,nodejs,javascript
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/301/1*wnx6xw8QZ9yFBzOvxlTnuA.png)

This article is about why setting up a npm private proxy is a good idea, going through most common questions that I’ve been asked since contributing to **sinopia’s** fork [verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425), and how a developer addresses many use cases that made me appreciate how useful it can be set up a local private proxy

Read more here.

[https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14)

* * *
If characters in The Avengers wrote a dev blog.
Tags: humor, programmerhumor, devhumor, avengers
Published: 2018-04-30 12:23:04

---
title: If characters in The Avengers wrote a dev blog.
published: true
description: If the characters of The Avengers wrote code tutorials
tags: #humor, #programmerhumor, #devhumor, #avengers
---

## Learn to effectively use git branches
#### By Groot
I am Groot. I am Groot:

```javascript
//i_am_groot.js
let I_AM_GROOT = "I am Groot";
iAmGroot(I_AM_GROOT);
```

```bash
$ git branch
// *i-am-groot
$ git checkout -b we-are-groot
$ git add .
$ git commit -a -m "We are GROOT!"
```

## The 6 infinity Ruby gems you need to use
#### By Thanos
Yes, I’ve spent countless years chasing down these gems, so that they will always be at my hand. The first of which can help you clean up your timezone tests. The Time gem supersedes Timecop as the reigning victor when dealing with Dates….

## Introducing the newest Rails helper: ActiveVision
#### By Aaron Patterson (@tenderlove)

I needed to see when my cat’s were yawning so I put together a quick computer vision library. I needed help so I paired with Vision on this project. That guy has some forward vision! You may be aware that a previously version was built, known as AdequateVision. I’m excited to announce AdequateVision has been promoted ActiveVision and we’re including it in Rails 6. You can read more about this Machine Learning OCR helper powered by the Mind Gem in this recent blog post published by Thanos.

## Hulk Bash! My favorite shell scripts
#### By  Bruce Banner

```shell
alias smash=touch

smash ironman.txt
```

## Why you should minify your code
#### By Antman
Using the new algorithm by Henry Pym, we can shrink and minify your code into “Pym Particles”. Just don't over do it or your code will reach a “Quantum Realm” where your code may no longer compile. 

## Show HN: thanOS - an operating system that will change your reality.
#### Submitted by Thanos - 8 hours ago 

## Advanced Web Development
#### by Spiderman

## Dark Mode all the things!
#### By Black Widow

## Full Stark Developers
### The next generation of robotic developers
#### By Peter Parker, intern at Stark Industries

## Rails Magic: under the hood
#### By Scarlet Witch and Dr. Strange

For more dev humor sign up for the DevStandUp mailing list. New articles every Monday!
https://tinyletter.com/DevStandUp
How to export xml scripts from SharePoint Online with PnP PowerShell
Tags: powershell, tutorial, spfx
Published: 2018-04-30 10:40:32

---
title: How to export xml scripts from SharePoint Online with PnP PowerShell
published: true
description: Exporting xml scripts from SharePoint
tags: #powershell #tutorial #spfx 
---

Exporting xml script from SharePoint 

First create new folder mkdir i.e. demo to house your exported xml.

Next connect to your SharePoint Online site
 
```Powershell
Connect-PnPOnline -url https://yourtenent.sharepoint.com/sites/mysite
```
then run the following command to retrieve the pages xml

```Powershell
Get-PnPProvisioningTemplate -out C:\demo\articles.xml
```

Navigate to view newly created xml file via command

```Powershell
explorer C:\demo\article_xml
```

when you have updated your xml to your specifications run the following command to apply the edited xml to your selected site i.e. mysite
```Powershell
Apply-PnPProvisioningTemplate -Path C:\demo\articles_xml\
```
How to change menu items within SharePoint Online with PnP PowerShell
Tags: powershell, pnp, spfx, tutorial
Published: 2018-04-30 09:40:01

---
title: How to change menu items within SharePoint Online with PnP PowerShell
published: true
description: 
tags: #PowerShell #pnp #spfx #tutorial
---
##Introduction
Changing menu navigation items within SharePoint sites is a tedious manual step, it can take a long time to update the menu items throughout numerous sites. This is where PnP PowerShell comes in to make your work/life easy.

This tutorial will show you how to remove/add a new menu item to multiple SharePoint sites using the power of PnP PowerShell cmdlets.

##PnP Powershell Overview 
SharePoint Patterns and Practices (PnP) contains a library of PowerShell commands (PnP PowerShell) that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and can work against both SharePoint Online as SharePoint On-Premises.
https://github.com/SharePoint/PnP-PowerShell/blob/master/Documentation/readme.md 

##The fun begins

First, we need to connect to the tenant of your current web
```Powershell
$tenantUrl = "https://xxx.sharepoint.com/"
```
Next, we will get your sign in credentials with Get-Credential
```Powershell
$cred = Get-Credential
```
In the next line of code, we will put our site page names with in an array called $sites
```Powershell
$sites = "volvo", "ford", "opel", "lada",
```
Then we will create a for each loop that will create a variable called $name to loop through the array of $sites
```Powershell
foreach($name in $sites) {
```
Here is where the nuts and bolts of the SharePoint PnP PowerShell come in. 
We connect to the PnPOnline and add our -Url with our previously created variable $tenantUrl then concat the previously created $name variable to sites/$name then our Get-Credentials $Cred variable which logs us in to the SharePoint Online.
```Powershell
Connect-PnPOnline -Url $tenantUrl/sites/$name -Credentials $cred 
```
We then loop through all the sites Navigation Nodes and find a “-Title” called "My old Cars" and remove it from the all the $sites Navigations entirely.
```PowerShell
Remove-PnPNavigationNode -Location QuickLaunch -Title "My old Cars" -Force 
```
Next, we can add our new Navigation Page link called “My New Cars” to our navigation menu. We find the location Quicklaunch then add a new -Title called "My New Cars" with the specific -Url.
```PowerShell
Add-PnPNavigationNode -Location QuickLaunch -Title “My New Cars” -Url 'SitePages/MyNewCars.aspx'
}
```
After running you will see that the old link has been removed and a new link node has been added to your navigations.

See full code below.

```PowerShell
$tenantUrl = https://YOURSITE.sharepoint.com 
$cred = Get-Credential 
$sites = "volvo", "ford", "opel", "lada", 
foreach($name in $sites) {

    Connect-PnPOnline -Url $tenantUrl/sites/mycar-$name -Credentials $cred 
    Remove-PnPNavigationNode -Location QuickLaunch -Title "My old Cars" -Force 
    Add-PnPNavigationNode -Location QuickLaunch -Title “My New Cars” -Url 'SitePages/MyNewCars.aspx' 
}
```

Hope this helps any aspiring PowerShell ninjas out there :)
How does Node.js optimize use in cloud platform?
Tags: node, javascript, discuss
Published: 2018-04-30 07:51:01

---
title: How does Node.js optimize use in cloud platform?
published: true
description: 
tags: nodejs, javascript, discuss
---

Simply please explain how and why Node.js is being used in cloud platforms. As well as why are they all going towards the JavaScript interpreter if that language is not that good and everyone criticizes it.

Also I was watching this video: https://youtu.be/NdISMdSDIaw
Did you read my email?
Tags: humour
Published: 2018-04-30 07:47:15

---
title: Did you read my email?
tags: Humour 
published: true
description: Is it urgent?
canonical_url: http://danlebrero.com/2018/04/30/did-you-read-my-email/
series: Efficient Development
---

![Is it urgent?](http://danlebrero.com/images/blog/did-you-read-my-email.png "Did you read my email?")

Dedicated with all my fondness to that good old friend that used to do this and never realized how extremely annoying it was.

Part of my upcoming conference talk "Habits of efficient developers" at [WeAreDevelopers 2018](https://www.wearedevelopers.com/congress/).
Geolocation in an Elm web application
Tags: elm, location, geolocation, ipaddress
Published: 2018-04-30 07:20:09

---
title: Geolocation in an Elm web application
published: true
description: 
tags: Elm, location, geolocation, ip address
---

Getting location for your web application comes down to basing it on an IP address or using the HTML5 geolocation provided through your browser.

In the IP address case the location information may come from the registration addresses of the IP addresses amongst other sources.

With the browser approach it will depend whether your device has GPS or not. If so then it can use that system, otherwise it may also look up third party databases of IP addresses. One example is the data collected by Google's StreetView surveys.

Getting IP address sourced location data using Elm is easy-as. First find a source by googling for IP address location data. I found this list to be very useful: (https://ahmadawais.com/best-api-geolocating-an-ip-address/)

Then you want to send off an Http.get request. For example:

Set up the get, where decodeData uses the original method or the pipeline decoder style and YourData is a type alias reflecting the format of the data.

```elm
getData = 
    Http.get "https://api.ipdata.co/?format=json" decodeData

decodeData =
    decode YourData
        |> required "latitude" Json.Decode.float
        |> required "longitude" Json.Decode.float
```

Do the send using the Http.send or RemoteData.send approach. In this case LoadData is a Msg `(Result Http.Error YourData)` you've defined to handle the response.

```elm
sendData =
    Http.send LoadData getData
```

If you want to use the HTML5 solution built into your browser then there is an Elm module for that - Geolocation.elm -http://package.elm-lang.org/packages/elm-lang/geolocation/1.0.2/Geolocation

In the simplest case you may fire off the Cmd msg from an Update function where FoundLocation will be another update function that interprets the results:

```elm
GetLocation ->  
            ( model, Task.attempt FoundLocation Geolocation.now )

FoundLocation -> 
    case location of
           Err error ->
               ... do a case match on the various error types

           Ok location ->
               ... access location.latitude, location.longitude and any other data you need
```

Note the user will be asked to confirm that it is okay to share location information.

You may also want your app to be told when the user moves. You can set up an Elm subscription, which will call a specified update function - eg MoveLocation - when there is a change, with a Location type parameter.

```elm
subscriptions : Location -> Sub Msg
subscriptions location =
    Sub.batch
        [ Geolocation.changes MoveLocation ]
```

Whether you need to store state on your model will depend on your application. If so then at the beginning you won't know location so you will need to store location as a Maybe field and incorporate handling for this.
What is your favourite git merge tool/strategy?
Tags: discuss, git
Published: 2018-04-30 07:13:27

---
title: What is your favourite git merge tool/strategy?
published: true
tags: discuss, git
---

VSCode is my favourite editor. But while rebasing and resolving merge conflicts, I switch to Atom as their git integration is too damn good for resolving conflicts IMO. Just wondering what other tools/strategies devs use in general for resolving merge conflicts.

This is my usual flow
1. Go to terminal and `git rebase master`
2. When conflict occurs, I open Atom, resolve conflict and stage the file
3. I come back to terminal and `git rebase --continue`
Github's Atom vs Microsoft's VS Code
Tags: discuss
Published: 2018-04-30 04:00:54

---
title: Github's Atom vs Microsoft's VS Code
published: true
description: 
tags: discuss 
---
#Between the two editors, which is your favorite? And why?

#####I mainly use Atom, i tried VS Code for a while, but I've never seemed to notice any core difference. So i want to see what others think. The one feature i whish Atom had is VS Code is the auto completion.
Kali Linux 2018.2 Release
Published: 2023-08-21 21:21:48

---
title: Kali Linux 2018.2 Release
published: true
date: 2018-04-30 00:00:00 UTC
tags: 
canonical_url: https://www.kali.org/blog/kali-linux-2018-2-release/
---

This Kali release is the first to include the Linux 4.15 kernel, which includes the x86 and x64 fixes for the much-hyped [Spectre and Meltdown](https://meltdownattack.com/) vulnerabilities. It also includes much [better support for AMD GPUs](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f6705bf959efac87bca76d40050d342f1d212587) and support for [AMD Secure Encrypted Virtualization](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33e63acc119d15c2fac3e3775f32d1ce7a01021b), which allows for encrypting virtual machine memory such that even the hypervisor can’t access it.

### Easier Metasploit Script Access

If you spend any significant amount of time writing exploits, you are undoubtedly familiar with the various Metasploit scripts that are available, such as **_pattern\_create_** , **_pattern\_offset_** , **_nasm\_shell_** , etc. You are likely also aware that all of these helpful scripts are tucked away under _/usr/share/metasploit-framework/tools/exploit/_, which makes them more than a little difficult to make use of. Fortunately, as of _metasploit-framework\_4.16.34-0kali2_, you can now make use of all these scripts directly as we have included links to all of them in the PATH, each of them prepended with **_msf-_** :

```
root@kali:~# msf-<tab>
msf-egghunter msf-java_deserializer msf-nasm_shell
msf-exe2vba msf-jsobfu msf-pattern_create
msf-exe2vbs msf-makeiplist msf-pattern_offset
msf-find_badchars msf-md5_lookup msf-pdf2xdp
msf-halflm_second msf-metasm_shell msf-virustotal
msf-hmac_sha1_crack msf-msf_irb_shell
root@kali:~#
root@kali:~# msf-pattern_create -l 50 -s ABC,123
A1A2A3B1B2B3C1C2C3A1A2A3B1B2B3C1C2C3A1A2A3B1B2B3C1
root@kali:~#

```

### Package Updates

In addition to the above changes, there have been updates to a number of applications including [Bloodhound](https://pkg.kali.org/pkg/bloodhound), [Reaver](https://www.kali.org/tools/reaver/), [PixieWPS](https://www.kali.org/tools/pixiewps/), [Burp Suite](https://www.kali.org/tools/burpsuite/), [Hashcat](https://www.kali.org/tools/hashcat/), and more. Since there are far too many packages to include in a default ISO, to see the full list of changes, we encourage you to review the [Kali Changelog](https://bugs.kali.org/changelog_page.php).

### Download Kali Linux 2018.2

If you would like to check out this latest and greatest Kali release, you can find download links for ISOs and Torrents on the [Kali Downloads](https://www.kali.org/get-kali/) page along with links to the OffSec virtual machine and ARM images, which have also been updated to 2018.2. If you already have a Kali installation you’re happy with, you can easily upgrade in place as follows:

```
root@kali:~# apt update && apt full-upgrade

```

As always, if you encounter any bugs at all, we implore you to open a report on our [bug tracker](https://bugs.kali.org/main_page.php). We can’t fix what we don’t know about.
Let’s Encrypt is awesome
Published: 2022-04-13 19:21:03

---
title: Let’s Encrypt is awesome
published: true
date: 2018-04-30 00:00:00 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2018/lets-encrypt-is-awesome/
---

Let’s Encrypt is a free way to get a SSL certificate onto your website and until recently I had never tried it. It is very easy and I think it is awesome.

IIS is the web server software the Microsoft include with Windows 10 and Windows Server. I have it installed on my laptop and it displays the default IIS page.

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2018/04/iis.jpg?resize=768%2C464&ssl=1)

It is not really a good idea to host websites on your laptop, use a dedicated web server, or host with a hosting company, however the techniques are the same and it gives me something to write about!

In order to point a domain name at what IIS on my machine was serving up I did the following:

- Do a google search for “whats my IP”, this will return your public IP. Most residential ISPs use dynamic IPs so it may change over time, (which is another reason not to host a website on your laptop!)
- Add an A record on a domain with the IP address you have just got
- Your public IP most likely points at your router not your laptop so enable port forwarding of port 80 and port 443 to the internal IP of your laptop (something like 192.168.0.11 etc)

Now comes the fun Let’s Encrypt stuff!

First you need a Let’s Encrypt client, there are a lot of them out there mostly for linux flavours, however a bit of googling found a windows one. Go to [https://github.com/PKISharp/win-acme/releases](https://github.com/PKISharp/win-acme/releases) and download the zip file and unzip it.

Run the executable from the zip file and follow the onscreen prompts.

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2018/04/letsencrypt.jpg?resize=768%2C480&ssl=1)

Press N to create a new certificate.

Then press 1 to bind to single website found in your IIS setup

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2018/04/letsencrypt2.jpg?resize=768%2C686&ssl=1)

And now magically Let’s Encrypt knows what you have setup in IIS.

Now all you need to do is enter an email address incase a renewal fails and agree to the let’s encrypt terms and you are all setup.

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2018/04/letsencrypt3.jpg?resize=768%2C920&ssl=1)

How awesome and easy is that for getting your websites working with a SSL certificate. If you have IIS configured on a server, give it a try and you can SSL all your things.