teleren/devto huggingface dataset:
PowerShell Edit Registry to FlipFlopWheel (Mouse Natural Scrolling)
Tags: fyi
Published: 2018-04-08 18:27:27

---
title: PowerShell Edit Registry to FlipFlopWheel (Mouse Natural Scrolling)
published: true
tags: FYI
canonical_url: 
---

# View all registry entries with FlipFlopWheel

Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0

# Change the registry settings for each entry with FlipFlopWheel  
# Reverse mouse wheel scroll FlipFlopWheel = 1  
# Normal mouse wheel scroll FlipFlopWheel = 0

Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $\_.PSPath FlipFlopWheel 1 }
Do you have a rollback plan?
Tags: devops, automation
Published: 2019-02-27 23:48:33

---
title: Do you have a rollback plan?
published: true
tags: devops, automation
canonical_url: 
---

It’s true that DevOps practices and CI can make your deploys much safer. That doesn’t negate the need for a rollback plan though.

A rollback plan is exactly what it sounds like. It’s a list of steps you’d take to undo a release and restore the system to its original state.

You or your team might think that you have one if you have an engineer who can undo things, but that isn’t the same as a rollback plan. Having a single or even a small fraction of the engineering team know how to undo a given release isn’t a replacement for a rollback plan.

> A rollback plan is a set of written steps that others can follow to undo the release.

Why have a way to undo a release if you have the other pillars of automation (code review, automated tests, etc…)? Just like you wouldn’t want to get placed into the middle of the woods without knowing how you got there and how to get home, you wouldn’t stage a release without knowing what steps would get you back.

Writing a rollback plan can also help clarify what impact the release is expected to have on other systems and what other steps should be taken.

Would you have to restart a service? Dependents of that service need to be notified.

Would you have to make a change to a database? If its shared with other applications those owners should be notified.

Would you have to restore data? Better make sure the backups are working and restorable.

## What does a rollback plan look like?

Here is a sample of what one might look like for an organization that has a release pipeline and both automated and manual tests. Yes, its entirely possible that yours is longer, but this is an example of where you can start. If you already have something like this, you can improve it by making sure you have a link to a document that answers the question “how?” for each of the below:

Release v5 of SuperImportantApp Enterprise Edition:

Scheduled: 1/2/2018 0700 PST

Rollback steps: Should the deploy fail for any reason, the following steps will need to be performed in order: Set CI to retrieve release tag 4.5 artifacts Deploy resultant artifacts to QA Confirm automated tests pass Release artifacts to Prod Rolling restart of service on all nodes 5a. See our internal document hub “Rolling release” document for how to do this Confirm tests pass, both manual and automated

What do you think? Leave a comment. For more like this see here: https://thaiwood.io/DevTo
Azure Serverless computing explained in less than 5 minutes #LessThan5Min
Tags: azure, beginners, cloud, lessthan5min
Published: 2018-02-13 15:52:55

---
title: Azure Serverless computing explained in less than 5 minutes #LessThan5Min
published: true
description: This is a short 5 minute explanation on Azure Serverless computing with an end to end demo
tags: #azure, #beginners #cloud #lessthan5min
---

{% youtube 7tP43V3cl5U %}
Developing Games with React, Redux, and SVG - Part 3
Tags: react, redux, javascript, programming
Published: 2018-02-13 15:38:39

---
title: Developing Games with React, Redux, and SVG - Part 3
published: true
description: 
tags: #reactjs #redux #javascript #programming
canonical_url: https://auth0.com/blog/developing-games-with-react-redux-and-svg-part-3/
---

In this series, you will learn how to make React and Redux control a bunch of SVG elements to create a game. The knowledge acquired throughout this series will also allow you to create other types of animations that are orchestrated by React and Redux, not only games.

In the last part, we'll implement a leaderboard feature and finish the Aliens, Go Home! game.

[Read on 👾👋](https://auth0.com/blog/developing-games-with-react-redux-and-svg-part-3/?utm_source=dev&utm_medium=sc&utm_campaign=react_game)

![Developing Games with React, Redux, and SVG - Part 3]
(https://thepracticaldev.s3.amazonaws.com/i/rshgbnf53faycjspfble.png)
Don't get bit by PostgreSQL case sensitivity
Tags: postgres, database
Published: 2018-02-13 14:20:11

---
title: Don't get bit by PostgreSQL case sensitivity
published: true
description: Learn how PostgreSQL case sensitivity works
tags: postgresql, database
---

I’ve ran into PostgreSQL case sensitivity myself before and I’ve had plenty of people ask me about it, so I thought it might be a good thing to bring up here.

Sometimes you hear that PostgreSQL is case-insensitive, but it isn’t really. What it actually does is convert your table and column names to lowercase by default. So take a look at this SQL:

    SELECT FullName FROM Person

PostgreSQL actually converts it to this:

    SELECT fullname FROM person

That is nice if you happen to like to write your queries with mixed casing.

But you’ll start to run into a problem if you’ve actually created the table and columns using case-sensitive names, which happens when you use quotes around the names. For example, consider these SQL CREATE statements:

    CREATE TABLE person (fullname VARCHAR(100), address VARCHAR(100))
    CREATE TABLE Person (FullName VARCHAR(100), Address VARCHAR(100))
    CREATE TABLE "Person" ("FullName" VARCHAR(100), "Address" VARCHAR(100))

In the first two examples, you get a table called “person“ with two columns called “fullname“ and “address”. That may not be obvious in the second example since the names are not lowercase, but remember that PostgreSQL converts your SQL to lowercase for you.

In the last example, the names are in quotes so their case is maintained. This means you’ll get a table called “Person“ with two columns called “FullName“ and “Address”. Now what happens if you try to run a query with a table called “Person”? Well, using SQL like this:

    SELECT FullName FROM Person

you’ll get a syntax error:

ERROR: relation “person does not exist
LINE 1: SELECT FullName FROM Person

This is because PostgreSQL is converting “Person to “person”, but there is no table called “person”. It is actually called “Person”.

![](https://blog.xojo.com/wp-content/uploads/2016/09/2016-09-23_09-38-33.png)

To avoid this error you instead have to write the SQL with quotes like this:

    SELECT "FullName" FROM "Person"

Obviously that can start to become a bit of a pain, so the moral of the story is don’t use quotes when creating tables or writing SQL queries so that everything is created as lowercase and things will work like you probably expect. You’ll especially want to pay attention to any tools you use to create SQL for you. If you use a tool’s UI to create a table and have a habit of typing in mixed case, the tool might generate SQL (or even the table itself) for you using quotes, which as you can see could mess you up later.

This post originally appeared on the [Xojo Blog](https://blog.xojo.com/2016/09/28/about-postgresql-case-sensitivity/).
Smallest-viewport first
Tags: responsive, viewport, mobile
Published: 2018-02-13 12:51:30

---
title: Smallest-viewport first
published: true
description: What do we mean when we say "desktop" or "mobile"? What understanding do we gain from these words?
tags: responsive, viewport, mobile
---

When it comes to designing/building (visual) user interfaces, the unique considerations actually being suggested by the terms "mobile" and "desktop" are:

+ Viewport size
+ Capabilities

##Viewport size: 

When we're designing or building any UI, we should start where we're most constrained. 

If we *start* by designing for large viewports, chances are we'll run into problems when we try and shrink those down for smaller viewports. Sometimes we may get away with it, but usually we won't.

If we start the right way around, we'll *always* get away with it. 

##Capabilities: 

Let's say we want to offer some functionality that takes advantage of a user's location. The natural thing that most people jump to is `"oh! If they're *on mobile* then..."`

But as soon as you do that, you're making an assumption about `device type` based on a `capability` (in this case, GPS) which any device could theoretically have, or not have.

No matter how many times we might *think* we can, we can not make assumptions based on device type. We can't assume a user's intentions, their restrictions, or even their viewport size. 

Terms like "mobile" and "desktop" place importance on the wrong things. If a user's viewport is 320px, that doesn't mean they're on a phone *at all*. They might have four browser windows side-by-side, or they might have visual difficulties and need to have their screen at a super-low resolution. If we've used their viewport size to make a call about their device, and then we make further assumptions about their needs based on this, then we're going to end up causing problems for ourselves *and* our users.

It's difficult for people to *not* think about the screen that's directly in front of them first. But it's super beneficial to change that mindset. 

It's so easy to get to a point where you've done a large-viewport mockup, and you go to "shrink it down" and find that it doesn't work anywhere near as well as you originally thought it should, or you find you've laid some data out in an entirely inappropriate format and you now have to develop something in a different way because you didn't plan ahead, or whatever. These are problems you just don't face when you do it _properly_.

Even worse is the situation where someone designs something for a large viewport, and hands it over to a developer and says "you deal with it for smaller viewports" - now we have different people designing the same part of a product for different viewport sizes. 

This will not end well. Especially not if we have design-minded folk handing off to people (like me!) who have no design skills whatsoever. 

###TL;DR
Viewports and capabilities are important, device type is not. So maybe we can stop fooling ourselves into thinking that it is?
Magento Product Reviews Extension  
Tags: magentoreviews
Published: 2018-02-13 11:00:01

---
title: Magento Product Reviews Extension  
published: True
description: Magento product reviews extension let you display customer testimonials on the product pages. 
tags: Magento Reviews 
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/0efequxua81ytvwg3zkl.png">
Magento product reviews extension let you display customer testimonials on the product pages. It enables the reviews and rating button on product pages which lead customers to the rating form. <b><a href="https://codecanyon.net/item/magento-product-reviews-rating-extension-with-review-reminder/21162835">Magento product reviews</a></b> extension display the top rated reviews in the first place and also shows the average product ratings. Customers can rate your products by value, quality, and price, when new visitor see your product rating, he buys your product without hesitation. The price of this Magento plugin is only 45$.

<b>Screenshots</a>
  
<img src="https://thepracticaldev.s3.amazonaws.com/i/53598zk2dm9uw8xoyuy4.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/8zg9cnuxcwisw83mxsdt.jpg">

<img src="https://thepracticaldev.s3.amazonaws.com/i/mc1xxmpfhhiqgtuv8al3.jpg">
30 Examples For Awk Command
Tags: linux, bash, beginners
Published: 2018-02-13 09:04:22

---
title: 30 Examples For Awk Command
published: true
description: 
tags: #linux  #bash #beginners
---

The awk command or GNU awk in specific provides a scripting language for text processing. With awk scripting language, you can make the following:
Define variables.
Use string and arithmetic operators.
Use control flow and loops.
Generate formatted reports.
Actually, you can process log files that contain maybe millions of lines to output a readable report that you can benefit from.

1 Awk Options
2 Read AWK Scripts
3 Using Variables
4 Using Multiple Commands
5 Reading The Script From a File
6 Awk Preprocessing
7 Awk Postprocessing
8 Built-in Variables
9 More Variables
10 User Defined Variables
11 Structured Commands
11.1 While Loop
11.2 The for Loop
12 Formatted Printing
13 Built-In Functions
13.1 Mathematical Functions
14 String Functions
15 User Defined Functions

https://likegeeks.com/awk-command/

Hope you like it.

Regards,
Twitter Without Short Links 
Tags: twitter, chromeextension, tool, showdev
Published: 2018-02-13 03:44:49

---
title: Twitter Without Short Links 
published: true
description: For a better UI
tags: twitter, chrome extension, tool, showdev
---

As [dev.to](https://chrome.google.com/webstore/detail/devtwitter/fhlipionhojfohecgljcljbpblojlaef?hl=en-US), I created my own Chrome extension (sorry Firefox), I was tired of not seeing the complete URL of a tweet. I felt the right to know where I'm going to land. Also, a lot of information can be found in a URL ([URLs can be UI](https://www.nngroup.com/articles/url-as-ui/)), and my click can depend on them. Example :

![Without fasterLinks](https://raw.githubusercontent.com/polomarcus/faster-links/master/app/images/TweetWithoutFasterLink.png)

<center>*What's the complete name of the repo?*</center>
I've been using my extension, called **[fasterLinks](https://chrome.google.com/webstore/detail/fasterlinks/ojggkiabpbjlckhpaphgdhhojgcpimah)** (worst name ever?), for **3 years now**, and even now I have trouble to use Twitter without it. So I wanted to share it with my favorite online community.! It replaces every short URLs (bitly, etc.) and display long, for twitter, URLs at their full length. ![With fasterLinks](https://raw.githubusercontent.com/polomarcus/faster-links/master/app/images/TweetWithFasterLink.png)<center>*fasterLinks!*</center>

Marketers love to add several [UTMs](https://en.wikipedia.org/wiki/UTM_parameters) to track tweets performance, as they are visual pollution, the extension removes them as well.

**fasterLinks** is free, [open source](https://github.com/polomarcus/faster-links), it does not contains any trackers, except the one used to count active users (28!!) on the Chrome store.

Fork it https://github.com/polomarcus/faster-links and/or try it https://chrome.google.com/webstore/detail/fasterlinks/ojggkiabpbjlckhpaphgdhhojgcpimah
Creating My First App: Mage To Go
Tags: showdev, swift, ios
Published: 2018-02-13 02:57:03

---
title: "Creating My First App: Mage To Go"
published: true
description: Making my first mobile app
tags: showdev, swift, ios
cover_image: https://thepracticaldev.s3.amazonaws.com/i/7p09st3egqwystcod0xb.png
---
When the iPhone first came out in 2007, I was blown away by the technology. It was incredible to see a computer with a beautiful interface in the palm of your hand. When the App Store was created soon after, the true potential of smartphones started to show. At the time, I thought it would be amazing to make an app of my own. However, I didn't know how to program. Fast forward 10 years and programming is my day job. So, I decided to try and fulfill that dream as a side project.

By day, I do web development, mostly with PHP and JavaScript. One of the frameworks I work with often is Magento. [Magento](https://magento.com/) is a full PHP platform for e-commerce sites, built in a similar vein as WordPress. Magento recently released a 2.0 version of the application built with modern PHP features and a more powerful REST API. Magento has an administration interface that is similar to WordPress, but it was built for desktop and not optimized for mobile. I saw an opportunity for a solid mobile app and Mage To Go is the result.

![Mage To Go Screenshot](https://thepracticaldev.s3.amazonaws.com/i/vp0ukadyz6f8ba73t1vv.png)

[Mage To Go](http://magetogo.com) is an iOS app written in pure Swift that connects to the Magento REST API allowing the user to login as an admin and view orders, products and customers. I released the app on the [App Store](https://itunes.apple.com/us/app/mage-to-go/id1332807419?ls=1&mt=8) last week! It is definitely a 1.0 product, but I'm already working on the next round of features. I am really proud of the work I have done on the app and for releasing my first side project into the wild.

I plan on creating a write-up explaining how I learned Swift and how I prepared the app for launch, like creating screenshots and designing the website (GitHub Pages and Nuxt.js to the rescue!). I would really appreciate any thoughts or feedback about the app. Also, if you have ever released an app on the app store, I would love any tips you may have.

Side projects for the win!
The Auto-breaking Switch Statement: A Proposal
Tags: javascript, ecma262, java, c
Published: 2018-02-13 02:17:15

---
title: "The Auto-breaking Switch Statement: A Proposal"
published: true
description: Almost no one uses breaks in the way they were meant.
tags: javascript, ecma262, java, c
---

I have taken advantage of fallthoughs in `switch` statements *maybe* twice. And that's a hard maybe. I can only really remember one instance where I did not `break` after every `case` block. For most of us, a switch statement will be mostly used as a super compact `if...else` statement like the following:

```js
function getSeasonFromMonth(month)
{
    let season = null;
    switch (month)
    {
        case December:
        case January:
        case February: {
            season = Winter;
            break;
        }
        case March:
        case April:
        case May: {
            season = Spring;
            break;
        }
        case June:
        case July:
        case August: {
            season = Summer;
            break;
        }
        case September:
        case October:
        case November: {
            season = Autumn;
            break;
        }
    }
    return season;
}
```

While you would probably use `return` in this case, I'm not to get the point across. What if, if you put a `break` in front of the `switch` then it automatically `break`d after every block? So you could rewrite the above as:

```js
function getSeasonFromMonth(month)
{
    let season = null;
    switch (month)
    {
        case 'December':
        case 'January':
        case 'February': {
            season = 'Winter';
        }
        case 'March':
        case 'April':
        case 'May': {
            season = 'Spring';
        }
        case 'June':
        case 'July':
        case 'August': {
            season = 'Summer';
        }
        case 'September':
        case 'October':
        case 'November': {
            season = 'Autumn';
        }
    }
    return season;
}
```

Clean code doesn't repeat itself and I can only imagine the nightmares caused from the side-effects of a forgotten `break`.

~So give us a `break` TC39 and put this in!~
Do you use version control?
Tags: devops, bestofdevs
Published: 2019-03-12 19:31:58

---
title: Do you use version control?
published: true
tags: devops, bestofdevs
canonical_url: 
---

You’ve probably heard it before, “You should use version control”. This one is a critical. In many cases other recommendations can depend on the size of your team, your organization, its goals, or its values.

Not this. This is a bedrock foundational recommendation. If you want to achieve any sort of reasonable, **helpful** automation, you must use version control. Why is this? Because you have to be able to recreate previous states if needed. You need to be able to rollback. Your team needs to be able to look back, to see what’s changed. To see how they got to the state today.

If you took your car to a mechanic, he’d ask about what happened before your car got there. How do you drive? What did you experience? What changed? Imagine going and just saying each time “I have no idea, I spaced out every time I drove, and never listened to the noise of the engine.” That’s what it’s like without version control. You can’t answer basic questions.

This isn’t just for when things go wrong though. Your team can be use this information when developing features. They’d be able to check if the feature or a similar one existed before, but was perhaps removed, for example.

It’s a good base for new team members to review as well. It can help them understand how features tend to get developed. That is, fast or slow, many at once, or just one at a time. They can also get a feel for the code review process (or start code review in the first place) and team style this way. Understanding what gets asked about or ultimately revised can help them integrate into the team faster.

Version control also lets you test different versions of your app. Your team can figure out how various features or specific implementations stand up to benchmarks or to your test suite.

Even if you don’t feel that your team is large enough now to warrant this, starting the process from the get go will make it easier to expand the team or get help later and is much safer than allowing potential features to languish on individual developer machines.

Finally, it’s important to actually use version control, not just have it available somewhere. If your team doesn’t use it, it allows the possibility of code and knowledge getting lost and won’t help you.

What do you think? Leave a comment. For more like this see here: https://thaiwood.io/DevTo
Launch Shiny App Without Blocking the Session
Tags: r, shiny, stan
Published: 2018-05-09 08:24:21

---
title: Launch Shiny App Without Blocking the Session
published: true
tags: R, Shiny, Stan
canonical_url: 
---

This is a neat trick I found on [Tyler Morgan-Wall’s Twitter](https://twitter.com/tylermorganwall/status/962074911949840387) and is originally attributed to [Joe Cheng](https://twitter.com/jcheng). You can run any Shiny app without blocking the session. My helper function to run ShinyStan without blocking is below:

```
launch_shinystan_nonblocking <- function(fit) {
  library(future)
  plan(multisession)
  future(
    launch_shinystan(fit) #You can replace this with any other Shiny app
  )
}
```

Hope that helps!
A Look Under the Hood of AdonisJS [Part 2] - Service Providers
Tags: node, tutorial, javascript
Published: 2018-02-12 21:54:20

---
title: A Look Under the Hood of AdonisJS [Part 2] - Service Providers
published: true
description: Add new bindings to the IoC Container using Service Providers.
tags: node, tutorial, javascript
cover_image: https://thepracticaldev.s3.amazonaws.com/i/nw6ywsir9glk78t74c50.png
---

> Subscribe to my YouTube channel for [more tutorials on working with VueJS and AdonisJS -- an MVC framework for NodeJS](https://www.youtube.com/channel/UCF5w1QdWroWOoxxXMgp88AQ?sub_confirmation=1)!

Follow along as I explore Service Providers in AdonisJS.

Service Providers are how we add instructions for new objects to our IoC Container.

Together we'll cover each section of the docs and go through the source code to see how they actually work.

We'll look at the **ViewProvider** and **AppProvider**, as well as the **Config** class and how it helps us manage our object configuration.

{% youtube 8ZIiraVxtvQ %}

---

In part 1 of this series, we took an in-depth look at the IoC Container. If you didn't watch that video, be sure to [watch it first](https://dev.to/patrickodacre/a-look-under-the-hood-of-adonisjs-part-1---the-ioc-container--3b0n)!

**By the end of these videos, you'll have a firm grasp on how the IoC Container and Service Providers do their jobs, and just how helpful they are.**