all blog posts

AVA Tutorial
avajs/ava
:
🚀 Testing can be a drag. AVA helps you get it done.
A concurrent test runner from the Andromeda galaxy. If I was to stray from
Jasmine then it could only
be for a project Sindre Sorhus is working on :)
The screenshots on the project site promised extensive assertion failure output with clean stack traces
and built-in Promise, async/await, Observable and React component support.
So I tried it out and yup, AVA delivered.
Get Started
# Install
npm init ava
# Run tests
npx ava --watch --verbose

.NET Regex Tutorial
Not nearly as confusing as it is in JavaScript.
using System.Text.RegularExpressions;
bool mach = Regex.IsMatch("input", @"\w+", RegexOptions.None);
Match match = Regex.Match("input", @"\w+");
IReadOnlyList<Match> matches = Regex.Matches("input", @"\w+");
string result = Regex.Replace("input", @"(\w+)", "$1");

Vue.js Tutorial
vuejs/vue
:
Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Why Vue
100k+ ⭐
: So many people can’t be wrong- Declarative rendering with a cool, terse syntax
- Low learning curve
- Reactive and composable view components
- Optional official
vue-router
andvuex
(statemanagement) @vue/cli
: Scaffold project with optional support for TypeScript, PWA, CSS Pre-processors, Linters, Tests, …- Automatic dependency tracking
- Virtual DOM
- Supports IE9+

Moment.js Tutorial
Moment.js is a legacy project, now in maintenance mode. In most cases, you should choose a different library.
See some alternatives at the end of this post.
Proceed at your own peril
Moment.js is a mutable wrapper with a fluent interface for the native JavaScript date object (property _d
).
Use .toDate()
to convert back to a JavaScript date.

Git Hooks with Husky
Avoid pushing changes that break the build with githooks and Husky.
typicode/husky
:
🐺 Git hooks made easy

Exotic Git Snippets
Some git commands and scripts that come in handy from time to time.

Chrome Extension: Starify Github project links
A free and open source Chrome Extension that adds Github stars badges to all links on a web page.
Before: https://github.com/sindresorhus/awesome
After: sindresorhus/awesome
JavaScript Testing: Getting started with Jasmine
Last update on Mar 28, 2023
jasmine-ts is deprecated. Updated to Jasmine 4.3.0.
Autohotkey Tutorial - hotkeys
Last update on Mar 28, 2023
Added double keypress hotkey example
Create Excels with C# and EPPlus: A tutorial
Last update on Mar 10, 2023
EPPlus is no longer free for commercial use!
Array.prototype for .NET developers
Last update on Mar 8, 2023
Added Distinct, flatMap
Moment.js Tutorial
Last update on Mar 8, 2023
Added notice about MomentJS being in maintenance mode
Git-NumberedAdd for PowerShell
Last update on Jan 16, 2020
Published to the PowerShell Gallery