Skip to content

Instantly share code, notes, and snippets.

@wickdninja
wickdninja / launch.json
Last active June 28, 2022 06:09
VS Code launch.json for NextJS
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"command": "yarn dev",
"name": "yarn dev",
"request": "launch",
@wickdninja
wickdninja / launch.json
Created June 26, 2022 23:25
Run NextJS ( Dev ) via VS Code's Debugger
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"args": [
"dev"
],
@wickdninja
wickdninja / launch.json
Created March 14, 2022 00:52 — forked from cecilemuller/launch.json
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@wickdninja
wickdninja / distance-in-words-to-now.pipe.ts
Last active September 24, 2021 15:02
angular wrapper for date-fns DistanceInWordsToNow function
import { Pipe, PipeTransform } from '@angular/core';
import { distanceInWordsToNow } from 'date-fns';
@Pipe({
name: 'distanceInWordsToNow',
pure: false
})
export class DistanceInWordsToNowPipe implements PipeTransform {
transform(value: string) {
return distanceInWordsToNow(value);
}
@wickdninja
wickdninja / basic-dev.ps1
Created June 20, 2020 05:29 — forked from flcdrg/boxstarter-bare-v3.ps1
My BoxStarter Scripts
# SQL Server - do this early to avoid issues with newer versions of VC++ 2015 redist
choco install sql-server-2017
choco install sql-server-2017-cumulative-update
choco install sql-server-management-studio
# tools
choco install git
choco install nodejs
choco install tortoisegit
choco install vscode
@wickdninja
wickdninja / boxstarter.ps1
Last active March 25, 2021 20:14 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Author: Nate Ross @wickdninja (https://wickd.ninja)
# HEAVILY BASED ON https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# Thanks to Jess Frazelle <jess@linux.com>
# 1. Install Chocolatey
<#
Set-ExecutionPolicy RemoteSigned -Force
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)

Keybase proof

I hereby claim:

  • I am wickdninja on github.
  • I am wickdninja (https://keybase.io/wickdninja) on keybase.
  • I have a public key ASCz-gAS67L039MD5LlG9OWvlIzhQmnAvv11hpw27svb2Qo

To claim this, I am signing this object:

// SQL TO FIND PAYMENT
// select PayToAccount,PayFromAccount,PayToName,memo,shardkey,amount,payfrom,* from Payments where CollectionDate = '12/04/2019' and amount = 500
// TEST TO FIX PAYMENT
[Test]
public void Remove_Special_Character()
{
Guid paymentID = new Guid("871fa1b5-0b49-4444-8bde-17595fea7340");
string pattern = @"[^a-zA-Z0-9\s\.\-\&\'\(\)\/\\\:\,\#\$\;\!\+\|]|[\t\u00a0]";
Regex reg = new Regex(pattern);
[Test]
public void Get_Aggregates()
{
var ids = new List<string>
{
"GUID_HERE"
};
foreach (var id in ids)
{
using (var uow = UnitOfWork.Create())
@wickdninja
wickdninja / failing-unit-test.md
Created November 10, 2018 16:29
How to write unit test for Ionic 4 when the component has child routes?

Failing test log

ClientsPage should create FAILED
        Error: StaticInjectorError(DynamicTestModule)[IonRouterOutlet -> ChildrenOutletContexts]:
          StaticInjectorError(Platform: core)[IonRouterOutlet -> ChildrenOutletContexts]:
            NullInjectorError: No provider for ChildrenOutletContexts!
            at NullInjector.get (webpack:///./node_modules/@angular/core/fesm5/core.js?:1360:19)
            at resolveToken (webpack:///./node_modules/@angular/core/fesm5/core.js?:1598:24)
            at tryResolveToken (webpack:///./node_modules/@angular/core/fesm5/core.js?:1542:16)