Skip to content

Instantly share code, notes, and snippets.

View johnou's full-sized avatar

Johno Crawford johnou

View GitHub Profile
@johnou
johnou / gist:7786c91a0ed3df1ee7399fb005441b42
Created August 13, 2021 09:35
Sparkpost SMTP relay exim configuration
Host smtp.eu.sparkpostmail.com
Port 587
Alternative Port 2525
Authentication AUTH LOGIN
Encryption STARTTLS
Username SMTP_Injection
Password The password is an API key with Send via SMTP permissions.
Open /etc/exim4/exim4.conf.template and find the following sections:
package {
import flash.display.Sprite;
import flash.events.LocationChangeEvent;
import flash.geom.Rectangle;
import flash.media.StageWebView;
public class Main extends Sprite {
private static const CAPTCHA_ENDPOINT : String = "https://www.habbo" + ".com/api/public/captcha";
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\", true);
RegistryKey subkey = key.CreateSubKey("Internet Settings");
int val = (int)subkey.GetValue("SecureProtocols");
WarningBox warningBox = new WarningBox();
if (val < 2048)
{
void AddKey()
{
@johnou
johnou / EnableTLS12.reg
Created February 15, 2021 19:53
Enable TLS 1.2 Windows 7
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"SecureProtocols"=dword:00000a80
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"SecureProtocols"=dword:00000a80
@johnou
johnou / KeyMain.java
Created January 15, 2021 00:38
Example of generating private key and certificates for Netty server context builder
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.security.*;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
Index: codec-dns/src/main/java/io/netty/handler/codec/dns/DoHQueryEncoder.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- codec-dns/src/main/java/io/netty/handler/codec/dns/DoHQueryEncoder.java (revision 3f5a82f729f41b5e626e7cb3039c0b503dbcb05e)
+++ codec-dns/src/main/java/io/netty/handler/codec/dns/DoHQueryEncoder.java (date 1589121383858)
@@ -33,11 +33,11 @@
import java.util.List;
/*
* Copyright (c) 2015 AsyncHttpClient Project. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
@johnou
johnou / upload_webgl_facebook.sh
Created January 24, 2020 09:37
Jenkins Facebook WebGL upload script
# Upload to Facebook
FACEBOOK_CLIENT_ID=xxxx
FACEBOOK_CLIENT_SECRET=xxxx
FACEBOOK_APP_ID=1234
cd $WORKSPACE/build
zip -r MyGame_WebGL.zip MyGame_WebGL
BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S')
set +x
/**
* Send message over WebSocket
*
* @param instanceId Instance ID
* @param bufferPtr Pointer to the message buffer
* @param length Length of the message in the buffer
*/
WebSocketSend: function(instanceId, bufferPtr, length) {
var instance = webSocketState.instances[instanceId];
@johnou
johnou / gist:eb296c297204c7316135ab7cfefaa09d
Created November 5, 2019 12:01
Dependency-Check report NPE
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project h4k-server: Can not process Dependency-Check report. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project h4k-server: Can not process Dependency-Check report.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThr