Skip to content

Instantly share code, notes, and snippets.

View n9iels's full-sized avatar

Niels van der Veer n9iels

View GitHub Profile
@n9iels
n9iels / curve-between-points.jsx
Last active October 28, 2018 22:58
Testing with SVG and drawing a smooth curve between two points
import React from "react";
import ReactDOM from "react-dom";
import "./styles.css";
function App() {
const start = { x: 200, y: 0 };
const stop = { x: 0, y: 100 };
// Mutations
@n9iels
n9iels / migrate-urls.php
Last active April 2, 2019 11:17
CLI script to recreate all urls in articles on a Joomla! website and create redirects for the old urls.
<?php
/**
* @package Joomla.Cli
*
* @copyright Copyright (C) 2018 Niels van der Veer. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* This is a CRON script which should be called from the command-line, not the
@n9iels
n9iels / github-webhook.ts
Last active July 29, 2022 02:41
Verify simple implementation to verify a GitHub webhook payload in TypeScript using NodeJs and Restify
import * as Restify from "restify"
import * as Crypto from "crypto"
type GithubWebRepository = {
id: number
name: string
full_name: string
private: boolean
git_url: string
ssh_url: string
@n9iels
n9iels / import-tags.php
Created March 16, 2017 10:40
Joomla! CLI script to import a CSV file with Joomla! Tag names
<?php
/*
* @package Knowledge
* @copyright Copyright (c) 2017 Perfect Web Team / perfectwebteam.nl
* @license GNU General Public License version 3 or later
*/
// Make sure we're being called from the command line, not a web interface
if (PHP_SAPI !== 'cli')
{