Skip to content

Instantly share code, notes, and snippets.

View LynnAU's full-sized avatar

Tom Lynn LynnAU

View GitHub Profile
@LynnAU
LynnAU / README.md
Last active July 24, 2024 14:45
Azure Container App - Provisioning Managed certificates for custom domains

Azure Container App - Custom Domain Managed Certficate scripts

This gist contains a create and destroy script to provision and cleanup custom domains and managed certficates assigned to Azure Container Apps.

This gist supports the following workflow:

  • Bind custom domain to existing Container App
  • Provision a managed certificate for the custom domain
  • Bind the managed certificate to the custom domain
@LynnAU
LynnAU / Nav.css
Created April 19, 2018 10:40
A react version of https://codepen.io/andyNroses/pen/AXwPkb . The style is slightly different to the codepen but the values can be moved over, it's basically the same code in a slightly different format and structure
.menu {
width: 40px;
height: 40px;
}
.center {
position: absolute;
margin: auto;
top: 0;
right: 0;
@LynnAU
LynnAU / ezpz-asis-answers.js
Last active December 12, 2017 05:05
This details the answers for each question that ASIS asks for their latest recruitment drive using VR
/*
This gist documents all the answers for the ASIS recruitment drive. The answers are structed in arrays so the number dictates which answer to select in the list. 0 = the first, 1 = the second, 2 = the third, etc. (it's zero-indexed).
Each answer has a comment to the right of it which is the actual answer you'd select on the page.
*/
w = function(t, e, n) {
if ("number" === typeof n && n >= 0 || "boolean" === typeof n || n) switch (t) {
case o.e:
return 87 === n; // The number 87, self explanatory
case o.c:
<?xml version="1.0" encoding="UTF-8"?>
<subtitle_script id="278733" title="English (US)" play_res_x="640" play_res_y="360" lang_code="enUS" lang_string="English (US)" created="2017-09-21 07:22:07" progress_string="100%" status_string="Approved" wrap_style="0">
<styles>
<style id="3391747" name="Main Dialogue" font_name="Trebuchet MS" font_size="24" primary_colour="&amp;H00FFFFFF" secondary_colour="&amp;H00000000" outline_colour="&amp;H00000000" back_colour="&amp;H00515152" bold="0" italic="0" underline="0" strikeout="0" scale_x="100" scale_y="100" spacing="0" angle="0" border_style="1" outline="2" shadow="0" alignment="2" margin_l="0020" margin_r="0020" margin_v="0018" encoding="1" />
<style id="3391749" name="Signs" font_name="Arial" font_size="20" primary_colour="&amp;H00FFFFFF" secondary_colour="&amp;H000000FF" outline_colour="&amp;H00000000" back_colour="&amp;H00000000" bold="1" italic="0" underline="0" strikeout="0" scale_x="100" scale_y="100" spacing="0" angle="0" border_style="1" ou
@LynnAU
LynnAU / idtocolour.js
Created September 14, 2017 00:30
Convert an ID string, snowflake or anything, to a decimal colour
function IDToColour(id) {
var hash = 0;
var numbers = id.split('');
for(var i = 0; i < id.length; i++) {
hash = id.charCodeAt(i) + ((hash << 5) - hash);
}
var c = (hash & 0x00FFFFFF).toString(16).toUpperCase();
return parseInt('00000'.substring(0, 6 - c.length) + c, 16);
}