Skip to content

Instantly share code, notes, and snippets.

View nigel-v-thomas's full-sized avatar

Nigel V Thomas nigel-v-thomas

View GitHub Profile
@nigel-v-thomas
nigel-v-thomas / script.js
Last active April 24, 2023 11:39
Contact Form 7 Redirecting to another URL after submissions - use this alternative to fix issue where form redirects before send is complete
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
setTimeout(function(){
window.location.href = 'https://example.com/thank-you/';
}, 5000);
}, false );
</script>
@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active December 30, 2023 18:05
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)
@YKCzoli
YKCzoli / shapefileConversion.md
Last active December 3, 2023 03:37
Step through of converting shapefile to geojson with qgis.

Converting shapefiles to geojson

####Assumptions

Get the data

We will use the Electoral District and Polling Division shapefiles found on the Elections Ontario site:

@praseodym
praseodym / AESGCMUpdateAAD2.java
Last active June 7, 2021 16:38
JDK8 AES-GCM code example
import javax.crypto.*;
import javax.crypto.spec.GCMParameterSpec;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import java.util.Arrays;
public class AESGCMUpdateAAD2 {
// AES-GCM parameters
public static final int AES_KEY_SIZE = 128; // in bits
@leewin12
leewin12 / gist:6505726
Created September 10, 2013 06:36
org.bouncycastle + maven shade
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.x</groupId>
<artifactId>y</artifactId>
<name>z</name>
<packaging>jar</packaging>
<version>1.0.0</version>
<properties>
@choffee
choffee / footprints_noQuickEdit.user.js
Created February 22, 2012 13:39
Footprints replace quickEdit with the more useful Details
// ==UserScript==
// @name Footprints details
// @namespace http://userscripts.org/users/58394
// @description Changes the details from
// @include https://footprints.york.ac.uk/*
// ==/UserScript==
//
//
window.addEventListener("load", function(e) {