teleren/devto huggingface dataset:
My first npm package mongoose-morgan
Tags: mongodb, showdev, npm, node
Published: 2017-09-28 21:05:26

---
title: My first npm package mongoose-morgan
published: true
description: 
tags: #mongo #showdev #npm #node
---

Hi, 

Recently I was working on one of my express app projects, and I had a need to log all data from morgan npm package to the database. So I found out there are some npm packages available to do it, but I had to create one of my own.

The package is named **mongoose-morgan**, here is a [link] (https://www.npmjs.com/package/mongoose-morgan) to it.

So mongoose-morgan is an npm package express middleware which is combining mongoose and morgan packages by adding an additional functionality to log morgan data into MongoDB.

To install it just call: 
```
npm install mongoose-morgan
```

And to use it with all of its features just add this code into your express app.

```
app.use(morgan({
    collection: 'error_logger'
    connectionString: 'mongodb://localhost:27017/logs-db',
    user: 'admin',
    pass: 'test12345'
   },
   {
    skip: function (req, res) {
        return res.statusCode < 400
    }
   },
   'dev'
));
```

The more important is that you have all available features from morgan package like **format** and **options** features, so you can select whatever you want.
If you're in a position to hire, what are you looking for in a web developer's portfolio?
Tags: discuss, career
Published: 2017-09-28 20:58:54

---
title: If you're in a position to hire, what are you looking for in a web developer's portfolio?
published: true
tags: discuss, career
---

Was curious, if you're in a position to hire, what sort of things do you look for in a web developer's portfolio? Be it their personal website or GitHub profile. Are there specific tools or languages you look at? Or a specific type of project or just growth in general?
Do you think there is a language better suited for solving data structures and algorithms?
Tags: discuss, career, javascript, python
Published: 2017-09-28 20:49:54

---
title: Do you think there is a language better suited for solving data structures and algorithms?
published: true
description: Is there a language more conducive to solving data structures and algorithms? Java? Python? JavaScript? I want to know your thoughts.
tags: discuss, career, javascript, python
---

To give you some backstory on why I am asking this question, I recently got my first dev job as a Front End Developer after graduating from a coding bootcamp this summer, studying MEAN stack. Although, this position is part-time and contract, I'm still job searching for a full-time role, as it's impossible to live in Seattle on part-time income. I'd like my next position to be full-stack and I know I need to strengthen my knowledge of data structures and algorithms (DS&A) to succeed during interviews. The only language I know is JavaScript.

Through my observations, it seems that many people do not code DS&A in JS. While I know people do, as I'm one of them, many resources on DS&A are in Java, C#, Python, or other languages. 

Do you think there is a language that is better suited for solving DS&A? Maybe based on native methods or other reasons?

Also if you have any resources you'd like to share, other than Code Wars, HackerRank, LeetCode, Code Fights, I'd love to know!
Running Local NPM Executables
Tags: npm, javascript, node, bash
Published: 2017-09-28 19:04:47

---
title: Running Local NPM Executables
published: true
description: How to run npm executables via local installs
tags: npm, javascript, node, bash
---

Typically, npm command line executables are installed globally so you can run it from whatever project on your machine. However, sometimes you'll want to run a locally installed package. Here's how!

When npm packages with executables are installed locally, they are linked to  `./node_modules/.bin` within your project. To invoke them, you would have to enter the entire path pointing to the package name.

For example, if you've locally installed `gulp` for a single project, it would look something like this to invoke it from the project directory: `./node_modules/.bin/gulp`

To make life easier, you can add this bit of script to your `.bashrc`:

```bash
npm-run() {
  $(npm bin)/$*
}
```

What's happening here is `npm bin` returns the path of where your executables are, and then the package name you want to invoke is inserted where the `$*` are.

So now, to run `gulp` all you have to do is `npm-run gulp`.

You can even define the function with a shorter name instead of `npm-run`, like `nr`, or whatever your heart desires :)

Easy as pie!
I'm the CTO of Meetup, ask me anything! 
Tags: ama
Published: 2017-09-28 16:39:50

---
title: I'm the CTO of Meetup, ask me anything! 
published: true
description: Our team enables 32+ million members in over 180 countries to organize and meetup in real life around the world. 
tags: ama
cover_image: https://thepracticaldev.s3.amazonaws.com/i/en1xeg6qw9wawy1lkjs9.jpg
---
I'm the CTO of Meetup and I lead the engineering team with a focus on continuous learning, iteration, and using data to launch software that brings people together to do what matters to them. Our team enables 32+ million members in over 180 countries to organize and meetup in real life around the world. 

I think a great deal about engineering empowerment, culture, organization, speed, and tackling technical debt. My AMA will start at **1PM ET today, September 28**, so please feel free to _Ask Me Anything!_
Explain DevOps like I'm five
Tags: explainlikeimfive, discuss, devops
Published: 2017-09-28 16:36:48

---
title: Explain DevOps like I'm five
published: true
description: I can't seem to wrap my head around the idea of DevOps
tags: explainlikeimfive, discuss, devops
---


For a while now, I've heard software engineers talk about DevOps and I just can't wrap my head around the idea. I tried digging into it one time and met even scarier terms like `continuous integration` etc.

Can someone explain DevOps to me and state its simplest purpose. You don't have to be a DevOps expert to contribute, any insight is valuable!
Random Oracle tips
Tags: oracle, sql
Published: 2018-08-26 13:51:29

---
title: Random Oracle tips
published: true
tags: oracle,sql
canonical_url: https://booyaa.wtf/2017/oracle-tips
---
## Hiding user input

Sometimes you need to keep something secret (shoulder surfing), this will only work in SQL/Plus or Oracle SQL Developer (F5/Run script mode aka broken SQL/Plus mode).

```plsql
SET SERVEROUTPUT ON

SET VERIFY OFF

ACCEPT sekrit PROMPT 'enter a secret (warning we''re going to print it on screen!)' HIDE

BEGIN
    dbms_output.put_line('sekrit: ' || '&sekrit');
END;
/
```

If you ran the script correctly, the input dialogue will echo stars `*` instead of your "secret".

If you can see the data you're entering, you ran Oracle SQL Developer statement mode (CTRL-ENTER).

## Sessions

### Finding

```sql
SET LINESIZE 140
SET PAGESIZE 50
COL sid FORMAT a5
COL serial FORMAT a5
COL username FORMAT a30
COL osuser FORMAT a30
COL machine FORMAT a30
COL client_ip FORMAT a20
SELECT
    sid,
    serial# AS serial,
    osuser,
    username,
    machine,
    logon_time,
    utl_inaddr.get_host_address(regexp_replace(machine,'^.+\\') ) AS client_ip
FROM
    v$session
WHERE
        username IS NOT NULL
    AND
        status <> 'KILLED';
```

### Killing

`alter system kill session 'sid,serial#';`

Code generated example

```sql
SELECT 
    'alter system kill session ''' ||sid||','||serial#|| ''';' as sql
FROM
    v$session
WHERE
    username = 'VICTIM';
```
Getting Flash to work on NWJS 0.25+ on Windows 10
Tags: nwjs, flash, adobe, node
Published: 2017-09-28 14:30:05

---
title: Getting Flash to work on NWJS 0.25+ on Windows 10
published: true
description: It's hard as hell to get Adobe Flash to work on NWJS and it shouldn't be.
tags: NWJS, flash, adobe, node
---

# Intro

You might assume that Node Webkit, or NWJS as it's now called, would support flash out of the box or in a simple straight forward way, but it does not. 

You can find some of the information needed from a [google group discussion](https://groups.google.com/forum/#!topic/nwjs-general/j7eCY7YJVcQ). Additional information is contained in a [github issue](https://github.com/nwjs/nw.js/issues/5891)

Below are the steps I used to solve the issue.

### Download Flash

- Install `https://get.adobe.com/flashplayer` with the PPAPI option
- Navigate to `C:\Windows\System32\Macromed\Flash`
- copy `C:\Windows\System32\Macromed\Flash` to `.\PepperFlash\` in your `nw` folder

### Modify NWJS Application

- Add the following code in your NWJS application

```javascript
chrome.contentSettings.plugins.set({
	primaryPattern: "<all_urls>",
	resourceIdentifier: { id: "adobe-flash-player" },
	setting: "allow"
});
```
Introducing our new Usage Dashboard – check your real-time and historic API usage data
Tags: companynews, productannouncement
Published: 2017-10-26 23:59:33

---
title: "Introducing our new Usage Dashboard – check your real-time and historic API usage data"
published: true
tags: Company News,Product Announcement
canonical_url: 
---

_We’re excited to show off our new Usage Dashboard feature, which you can use to&nbsp; check your real-time and historic usage data for our visual recognition API. With the dashboard, you’ll be able to learn more about your usage pattern, identify any inconsistency in the historic trends, and reconcile your monthly bill more easily!_

[Show me the dashboard!](https://clarifai.com/developer/login/)

Wondering where you can go to explore your past usage information? Or where you can see how many operation calls you’re making as you test out our API? Well, dear Clarifai users, we heard you loud and clear —&nbsp;and today, we’re announcing the launch of our shiny new Usage Dashboard!

The new Usage Dashboard allows you to check your real-time and historic usage data up to the last 90 days. With the dashboard, you’ll be able to learn more about your usage pattern, identify any inconsistency in the historic trends, and reconcile your monthly bill more easily.

To check out the new feature, log into your Clarifai account, and locate the **Usage** section on the left-hand side menu.

![image5](http://blog.clarifai.com/wp-content/uploads/2017/09/image5.png)

Here, you’ll be able to access your own usage dashboard. The top panels indicate your real-time usage metric, broken down in 3 billed categories —&nbsp;Billed Operation, Custom Concepts, and Stored Inputs.

![image3](http://blog.clarifai.com/wp-content/uploads/2017/09/image3.png)

Under the real-time usage are the historic usage graphs for the same categories. You can select the billing cycle to refresh the displayed data on these graphs.

![image4](http://blog.clarifai.com/wp-content/uploads/2017/09/image4.png) ![image2](http://blog.clarifai.com/wp-content/uploads/2017/09/image2.png) ![image1](http://blog.clarifai.com/wp-content/uploads/2017/09/image1.png)&nbsp;&nbsp;

How do you like our new Usage Dashboard? Let us know at [feedback@clarifai.com](mailto:feedback@clarifai.com) — we’d love to hear from you!

[Show me the dashboard!](https://clarifai.com/developer/login/)
Explain Git Rebase just like I'm five
Tags: git, explainlikeimfive, discuss
Published: 2017-09-28 08:30:09

---
title: Explain Git Rebase just like I'm five
published: true
description: Explain the Git rebase process for 5-year-olds
tags: git, explainlikeimfive, discuss
---

Git rebasing is a good example for teaching 5-year-olds when they start coding as they can work on something more complex. Explain!
Release
Tags: life, nomadic, ssh, tmux
Published: 2017-09-28 04:20:46

---
title: Release
published: true
description: About getting a new screen and quitting my job
tags: #life #nomadic #ssh #tmux
---

Perhaps you're like me and spend most of your waking life with your computer. So when things change in your computer world they can be a big thing.

About a year ago, my screen broke in the Himalayas. Because I'm nomadic and have a relatively rare laptop (Dell XPS 13 QHD+) I've had to use a surrogate screen, either my phone (I wrote a detailed geeky [post](http://tombh.co.uk/when-your-screen-breaks-in-the-himalayas) about that at the time) or more recently a dirt cheap laptop to act as a SSH/VNC client.

Then in the last 6 months I've had a job that I increasingly became frustrated with. I could write a whole post about it, but I think the issues are just all too common to stir much motivation for exploring it through prose. All I will say for now is that I believe the human existential condition is a fundamental quantity requiring balancing in the algebra of computer science.

Last week I was in Singapore. I replaced my screen and quit my job.

Suddenly my thoughts are flooded with new ideas. I'd learn a whole new environment in the limitations of SSH and VNC. I now only use a terminal ([Alacritty](https://github.com/jwilm/alacritty)), Tmux and a browser (Firefox nightly), albeit wrapped up in the i3 WM, but it could be any WM really. But now using this setup through a crisp and colourful 4k screen is glorius. That environment precipitated the need to hack Neovim and in turn Tmux and ZSH to support conventional key mappings such as CTRL+C/V copy/pasting. I've in fact refactored the Neovim keymappings into [an entire plugin](https://github.com/tombh/novim-mode) that almost entirely negates the need for NORMAL mode. I hope to do the refactoring for Tmux and ZSH as well soon.

As for ending my job, I'm now inspired again to complete my book (about meditation, though I'm starting to form ideas for a software book too), continue the computationally intensive task of [calculating the largest viewshed in the world](https://github.com/tombh/total-viewsheds) and improving my project to [fully render Firefox over TTY](https://github.com/tombh/texttop).

And I can do all these things on my new beautiful screen. Happy days indeed :)
Suggested Resources for Dapps with Ethereum + React?
Tags: ethereum, blockchain, react
Published: 2017-09-27 23:26:37

---
title: Suggested Resources for Dapps with Ethereum + React?
published: true
description: Recommended resources for creating React UIs for Ethereum?
tags: #ethereum #blockchain #react #react
---

Hey everyone! I've been delving into making smart contracts with Solidity via Ethereum's blockchain, and now I'm looking to hook it up to a nice interface with React. There's a couple tutorials out there with combining web3 together in React to connect with Ethereum, but a lot of them are outdated, incomplete or pretty obscure. Anyone have some good resources for this? How do you create your webapps when writing smart contracts?
Explain Facebook's BSD+patents license like I'm five
Tags: discuss, explainlikeimfive, opensource, react
Published: 2017-09-27 19:22:19

---
title: Explain Facebook's BSD+patents license like I'm five
published: true
tags: discuss, explainlikeimfive, opensource, react
---

I'm sure there are some devs out there who are completely lost in this conversation and I'm not as tuned in as I could be. Could someone explain the concern, Facebook's response, and the current outlook as of today?

You don't have to be an expert either to contribute, any insight is valuable!
Hi, I'm Matt Nield
Tags: introductions
Published: 2017-07-20 10:42:43

---
title: Hi, I'm Matt Nield
published: true
description: My introduction post
tags: introductions
---

I have been coding for sine 1998, predominantly in CMS and eCommerce platforms and have and the pleasure of seeing the web and surrounding technologies grow into something awesome.

You can find me on Twitter as [@mnield][4] - I always love new follows :)

Having moved to the south of the UK to go to university, I now live just outside of Oxford with my wife and two children.

I work for [Ridgeway][3], a Web Agency based in Witney, UK. Ridgeway specialises in Content Managed solutions and e-commerce based on [Kentico][1] and [Kentico Kontent][2]. I'm also a [Kentico MVP][7] and have had the privilege for 2017, 2018, and 2019.

I mostly program in these languages: C#.

I am currently learning more about [JAMstack][6], ASP.NET MVC, Visual Studio Code, and Azure web hosting and infrastructure.

I'm also very keen on environmental issues and what we can do to what and reverse the damage that we're doing to our planet. My wife and I also have a zero-waste store in our hometown ([Going Green][5]) as our first step to start doing something more positive than just sorting our own recycling!

Nice to meet you.

[1]: https://kentico.com
[2]: https://kontent.ai
[3]: https://ridgeway.com
[4]: https://twitter.com/mnield
[5]: https://goinggreenuk.co.uk
[6]: https://jamstack.org/
[7]: https://www.kentico.com/company/mvp
Experimental Keyboard Game
Tags: javascript, games, type, showdev
Published: 2017-09-27 18:51:12

---
title: Experimental Keyboard Game
published: true
description: This is my first article in here
tags: #javascript #games #type #showdev
---

As my first article in here, I would like to share a simple game I had created sometime ago [KeysHit](https://aneelkkhatri.github.io/keyshit/).

![](https://thepracticaldev.s3.amazonaws.com/i/qytqnzqntjhdciovpq8h.png)

I am really liking this dev community, and am hoping to learn from and contribute  to it.

Keep inspiring!
git workflows - between forks, squash and rebase
Tags: git, github, discuss, devops
Published: 2017-09-27 16:33:21

---
title: git workflows - between forks, squash and rebase
published: true
description: 
tags: git, github, discuss, devops
---

Git is very flexible and this is what makes it great, everyone can adopt their own workflows. So without going into a flame war I'm hoping to collect some opinions:

Situation: for a SaaS product that will benefit from CI/CD, the team (4-12 engineers), working with github private repos and leveraging pull-requests to merge work from feature branches to a single `master` branch. 
1. what would be pros/cons for using a single repo and all the team opening feature branches in it, vs the github workflow where team members fork and work in their own repo to create PRs from.
2. if the pull-request merge strategy is to squash (done using GH's button on the PR), then there's essentially no reason for members to rebase on their own branches if the sole purpose of it is to squash the commits.
Pricing online courses/books for Devs around the world.
Tags: discuss
Published: 2017-09-27 15:54:10

---
title: Pricing online courses/books for Devs around the world.
published: true
description: 
tags: #discuss
---

Should Devs consider the difference between earnings in different countries and derive some normalisation method while pricing their work for international market? As it would help lot more junior devs in countries where pay is much less.(Cost of living should also be counted in)

Suggest.
My first time using React 16.0
Tags: react16, newfeatures, polyfills, react
Published: 2017-09-27 14:07:02

---
title: My first time using React 16.0
published: tue
description: Using React 16.0 for the first time
tags: react-16, new-features, polyfills, react
---

Yesterday I started working on a new **React** project which I am calling for the time being **React Universal Blog**. I set up my basic workflow, directory structure, and files. I set up for <code>Jest</code> testing, initially mocking out stylesheets and images to make sure everything was working properly. Later I'll switch over to <code>mocking</code> <code>CSS Modules</code>, because I use them with <code>POSTCSS</code>. It's not necessary to do that unless you intend to use <code>Jest Snapshot Testing</code>, and I do! I really want to check it out, and it just makes sense when you ***do*** use <code>CSS Modules</code> in development.

But that's not why I am writing this post. I started this new project yesterday. And guess what big event took place yesterday! **React 16.0** was released! And guess what happened in my project. I installed **React 16.0**.

Before I realized all this, I decided to make sure that my <code>Jest configuration</code> was working, so today I typed <code>npm run test</code> in Terminal. This is what was printed out to the console:

```markdown
> react-universal-blog-app@1.0.0 test /Users/mariacam/Development/react-universal-blog-app
> jest

PASS  src/sum.test.js
PASS  src/App.test.js
  â— Console

    console.error node_modules/fbjs/lib/warning.js:33
      Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. http://fb.me/react-polyfills


Test Suites: 2 passed, 2 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        1.669s
Ran all test suites.
```

Notice something different?
```markdown
console.error node_modules/fbjs/lib/warning.js:33
  Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. http://fb.me/react-polyfills
```

That's what reminded me that **React 16.0** was released yesterday, and that my project must be using it! I wonder what other new goodies I will encounter!

Happy coding!
Journey to Artificial Intelligence
Tags: ai, discuss, learning, begginers
Published: 2017-09-27 12:14:00

---
title: Journey to Artificial Intelligence
published: true
description: This article talks about my starting experience learning AI
tags: AI, discuss, learning, begginers
cover_image: https://thepracticaldev.s3.amazonaws.com/i/yawxp48vjn7edk4q71u9.jpg
---
One might say that it is pretty intimidating to get yourself into learning Artificial Intelligence. Well, actually it is. AI is such an advanced and a diverse stream of knowledge that once you encounter the word itself, you get drowned with anxietal thoughts.

The possibilty of being able to grasp the know-hows of artificial intelligence was _artificial_ for me. I never considered crossing the path towards learning it. Imagine the algorithms, math and science that you need to immerse yourself with. It seems to me that it would take a miracle before I would even dare start with it. It is just too highly technical and is just out of the bounds of my knowledge. 

I was overthinking. Anxiety and fear took over me. Learning new stuff can really be intimidating especially if you dont know an inch about the topic. I then realize that if I continue to let my insecurities prevail, how can I succeed as a better programmer and as a better computer scientist?

Eventually, I got motived when I enrolled myself in a Masters in Computer Science. The possibilities of where you might arrive when learning AI is exponential. I got interested even more after I started reading Peter Norvig's and Stuart J. Russell's book on [Artificial Intelligence: A Modern Approach](https://www.google.com.ph/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwjZ7eC4qsXWAhUEx7wKHXqwADoQFgg2MAI&url=https%3A%2F%2Fwww.amazon.com%2FArtificial-Intelligence-Modern-Approach-3rd%2Fdp%2F0136042597&usg=AFQjCNHvNYlS6mDJvewRpMnxOnVDtrztGg). Since then I could not stop myself from learning. I am literally deep diving myself into it.

As my knowledge on Artificial Knowledge progress, I would then like to share with you with what I might be able to explain and teach. I will be posting a series of topics about AI. Let us learn together and venture the world of AI. 

This is my journey with Artificial Intelligence and it has just begun. I am eager and excited for this journey!