Skip to content

Instantly share code, notes, and snippets.

View daffodilistic's full-sized avatar

T. H. Soh daffodilistic

View GitHub Profile
@daffodilistic
daffodilistic / app_passwd_auth.php
Created March 17, 2021 09:51
Basic plugin to demonstrate enabling application passwords and REST endpoint security via HTTP Basic auth
<?php
/**
* Plugin Name: Application Password and REST Authentication Test Plugin
* Description: Basic plugin to demonstrate enabling application passwords and REST endpoint security via HTTP Basic auth
* Version: 0.1.0
* Requires at least: 5.6
* Author URI: https://github.com/daffodilistic/
* Author: Soh Thiam Hing
* License: The Unlicense
@daffodilistic
daffodilistic / myapp_azurewebsites.conf
Created June 3, 2020 14:24
Nginx Reverse Proxy to azurewebsites.net on an IPv6 Host behind CloudFlare
# Nginx configuration file for a simple reverse proxy from a domain to azurewebsites.net
# References: https://withouttheloop.com/articles/2017-07-23-nginx-letsencrypt-azure-web-app/
# Note: Ensure your AAAA records for your domain under CloudFlare are configured!
# A records are not needed since Cloudflare will be proxying IPv6 to IPv4 requests for us.
server {
listen 80;
listen [::]:80;
server_name myapp.site www.myapp.site;
@daffodilistic
daffodilistic / Debug.js
Last active May 4, 2021 07:20
Override Chrome's console object with debug package
import debug from 'debug';
// HOW TO USE THIS:
// 1) import console from './helpers/DebugHelper'
// 2) set localStorage key: "debug" to "hello-world:*"
export default class console {
static DEBUG_KEY = "hello-world";
static log(args) {
const logger = debug(console.DEBUG_KEY + ":log");
@daffodilistic
daffodilistic / Mod3And5.java
Last active June 27, 2017 01:56
EDMW is a mean and scary place
public class Mod3And5 {
public static void main(String args[]) {
for (int i = 1; i <= 100; i++) {
String out = "";
if (i % 3 == 0) {
out += "Fizz";
}
if (i % 5 == 0) {
out += "Buzz";
}
@daffodilistic
daffodilistic / RaySatWatchDog.au3
Created June 18, 2014 06:50
Maya Mental Ray Satellite Watchdog
; NOTE - run this in SYSTEM account! Use Task Scheduler or System Service!
RaySatWatchdog()
Func RaySatWatchdog()
While 1 ; Opens up a WHILE loop, with 1 as a constant, so it is infinite
Local $aProcessList = ProcessList("raysat2014.exe")
For $i = 1 To $aProcessList[0][0]
ProcessSetPriority ( $aProcessList[$i][1] , 0 )
Next