Skip to content

Instantly share code, notes, and snippets.

View dirkluijk's full-sized avatar
💭
yeah

Dirk Luijk dirkluijk

💭
yeah
  • Alblasserdam, Netherlands
View GitHub Profile
@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';
@dirkluijk
dirkluijk / Inception.php
Last active December 21, 2015 21:58
CODECEPTION!
<?php
class Inception
{
protected $inception;
public function __construct()
{
$this->checkLevel();
$this->inception = new Inception();
}