Skip to content

Instantly share code, notes, and snippets.

View dirkluijk's full-sized avatar
💭
yeah

Dirk Luijk dirkluijk

💭
yeah
  • Amersfoort, the Netherlands
View GitHub Profile
@dirkluijk
dirkluijk / HelloWorld.java
Last active December 11, 2024 09:02
HelloWorld.java - Nanowar of Steel - Lyrics
// [Verse 1]
// "Package I-T dot Nanowar dot Of Steel dot hello world (Semicolon)"
// "Public class Hello World Main Launcher Class (Open brackets)"
package it.nanowar.ofsteel.helloworld;
public class HelloWorldMainLauncherClass {
// "Public hello world main launcher class round brackets int foo (Close brackets)"
// Super round brackets this dot foo equals foo (Semicolon, close brackets)
@dirkluijk
dirkluijk / badge.svg
Last active February 19, 2026 14:05
Needle DI coverage badges
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dirkluijk
dirkluijk / fetch-mock.ts
Last active October 17, 2024 23:53
vitest-fetch-mock-modernized
import { vi } from 'vitest';
import type { Mock } from '@vitest/spy';
// type-definitions
export type FetchMock = Mock<typeof global.fetch> & AdditionalMethods;
interface AdditionalMethods {
mockResponse(fn: ResponseProvider): FetchMock; // @prettier-ignore
mockResponse(response: string, responseInit?: ResponseInit): FetchMock;
@dirkluijk
dirkluijk / vite-plugin-express.ts
Last active October 8, 2024 12:37
vite-plugin-express
import type { Connect, Plugin, UserConfig, ViteDevServer } from "vite";
import type { IncomingMessage, ServerResponse } from 'http';
import type { Application } from 'express';
export interface VitePluginExpressConfig {
appName?: string
initAppOnBoot?: boolean
exportName?: string
appPath: string;
}
@dirkluijk
dirkluijk / 15 years of JavaScript.md
Created July 5, 2024 12:07
15 years of JavaScript

15 Years of JavaScript: build tools & module systems

My career as a web developer started back in 2009. At the time of writing, that is already 15 years ago! Web development used to be so much different. Some things were simpler, other things where more difficult. In this article, I'd like to look back on all the challenges we faced, how we've dealt with them. We will discuss what has become legacy, and what to expect in the near future.

// My first experience with writing web pages was in 2003, when I was a 12 year old teenager, trying to make a simple website with HTML and CSS. For me, this was

The Pre-ES6 era (2009 - 2015)

A lot was going on by the end of the 2000s. The Web 2.0 trend had lead to more dynamic web pages. JavaScript became more and more important. We started to utilize AJAX more and more, which allows you to make your webpage more interactive with the server. It was no surprise that in 2010, we saw single-page application (SPA) frameworks like Backbone.JS and Angular.JS being i

@dirkluijk
dirkluijk / 15 years of JavaScript.md
Created July 5, 2024 11:56
15 years of JavaScript

15 Years of JavaScript: build tools & module systems

My career as a web developer started back in 2009. At the time of writing, that is already 15 years ago! Web development used to be so much different. Some things were simpler, other things where more difficult. In this article, I'd like to look back on all the challenges we faced, how we've dealt with them. We will discuss what has become legacy, and what to expect in the near future.

// My first experience with writing web pages was in 2003, when I was a 12 year old teenager, trying to make a simple website with HTML and CSS. For me, this was

The Pre-ES6 era (2009 - 2015)

A lot was going on by the end of the 2000s. The Web 2.0 trend had lead to more dynamic web pages. JavaScript became more and more important. We started to utilize AJAX more and more, which allows you to make your webpage more interactive with the server. It was no surprise that in 2010, we saw single-page application (SPA) frameworks like Backbone.JS and Angular.JS being i

15 Years of JavaScript: build tools & module systems

My career as a web developer started back in 2009. At the time of writing, that is already 15 years ago! I remember that web development used to be so much different. Some things were simpler, other things where more difficult. In this article, I'd like to look back on all the challenges we faced, how we've dealt with them. We will discuss the things that have become legacy, and what to expect in the near future.

// My first experience with writing web pages was in 2003, when I was a 12 year old teenager, trying to make a simple website with HTML and CSS. For me, this was

The Pre-ES6 era (2009 - 2015)

A lot was going on by the end of the 2000s. The Web 2.0 trend had lead to more dynamic web pages. JavaScript became more and more important. We started to utilize AJAX, which allows you to become more interactive with the server. It was no surprise that in 2010, single-page application (SPA) frameworks like Backbone.JS and Angular.JS where intro

@dirkluijk
dirkluijk / CustomJdbcRepositoryFactory.kt
Last active December 3, 2023 06:03
Specification API for Spring JDBC
package com.foo.util.specification.jdbc
import org.springframework.context.ApplicationEventPublisher
import org.springframework.data.jdbc.core.JdbcAggregateTemplate
import org.springframework.data.jdbc.core.convert.DataAccessStrategy
import org.springframework.data.jdbc.core.convert.JdbcConverter
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory
import org.springframework.data.mapping.callback.EntityCallbacks
import org.springframework.data.relational.core.dialect.Dialect
import org.springframework.data.relational.core.dialect.RenderContextFactory
@dirkluijk
dirkluijk / interceptors.spec.ts
Created June 20, 2018 15:09
Testing Angular interceptors with Spectator
import { HttpErrorResponse, HttpRequest, HttpResponse } from '@angular/common/http';
import { Router } from '@angular/router';
import { createService, createSpyObject } from '@netbasal/spectator';
import { of, throwError } from 'rxjs';
import { RedirectInterceptor } from './redirect-interceptor.service';
import anything = jasmine.anything;
describe('RedirectInterceptorService', () => {
const spectator = createService({
service: RedirectInterceptor,
@dirkluijk
dirkluijk / testMail.php
Last active August 29, 2015 14:04
Test mail functionality
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', true);
ini_set('display_errors', false);
echo sprintf('Sending message...');
$to = 'dirk@luijkwebcreations.nl';
$from = 'dirk@luijkwebcreations.nl';