Skip to content

Instantly share code, notes, and snippets.

View sjwaight's full-sized avatar
😎
Happy Days

Simon Waight sjwaight

😎
Happy Days
View GitHub Profile
@sjwaight
sjwaight / jd-process.md
Created November 3, 2023 10:20
Job description and hiring process from ChatGPT.

Certainly! Crafting an effective job description and hiring process for a hybrid designer/frontend web developer role can help attract and identify top talent. Here's a sample job description and hiring process:

Job Description: Hybrid Designer/Frontend Web Developer

Company Overview: [Your Company Name] is a dynamic and innovative web design and development agency, and we're seeking a passionate and creative individual to join our team as a Hybrid Designer/Frontend Web Developer. In this role, you will have the opportunity to work on exciting projects, grow your skills, and collaborate with a talented and supportive team.

Job Responsibilities:

  1. Web Design:
@sjwaight
sjwaight / BankAccountNS.cs
Created September 25, 2023 06:43
Sample Bank Account C# class
namespace BankAccountNS
{
/// <summary>
/// Bank account demo class.
/// </summary>
public class BankAccount
{
private readonly string m_customerName;
private double m_balance;
@sjwaight
sjwaight / psrule.yaml
Created September 5, 2023 08:12
A good default PSRule configuration
#
# PSRule for Azure configuration
#
# Please see the documentation for all configuration options:
# https://aka.ms/ps-rule-azure
# https://aka.ms/ps-rule-azure/options
# https://aka.ms/ps-rule/options
# https://aka.ms/ps-rule-azure/bicep
@sjwaight
sjwaight / sample.bicep
Last active September 12, 2024 03:32
Sample bicep template that deploys a private ASEv3, App Service Plan and a Web App with direct VNet access
param vnetName string = 'sampleVnet'
param aseName string = 'sampleAse'
param webAppName string = 'sampleWebApp'
param storageAccountName string = 'samplestorage'
param functionAppName string = 'sampleFunctionApp'
param aseLocation string = resourceGroup().location
@description('Existing Sample Virtual Network')
resource aseVirtualNetwork 'Microsoft.Network/virtualNetworks@2023-02-01' existing = {
@sjwaight
sjwaight / remove-member.sh
Created June 12, 2023 00:43
Curl query to delete a user from a meetup using the meetup.com UI API
curl -X DELETE https://www.meetup.com/mu_api/urlname/members?queries=%28endpoint%3Agroups%2Fazure-sydney-user-group%2Fmembers%2F*****MEMBER_MEETUP_USER_ID*****%2Cmeta%3A%28method%3Adelete%29%2Cparams%3A%28banMember%3A%21f%2ChideRemoverEmail%3A%21f%2CremoveMessage%3A%27Not+visited+the+group+in+the+past+12+months.+You+can+rejoin+if+you+like.%27%2CsendEmailToOrganizer%3A%21f%29%2Cref%3AremoveMember_azure-sydney-user-group_*****MEMBER_MEETUP_USER_ID*****%29
@sjwaight
sjwaight / meetup-group-query.sh
Created June 12, 2023 00:39
Curl query using meetup.com web UI API to retrieve list of "All user" page for Azure Sydney User Group
curl https://www.meetup.com/mu_api/urlname/members?queries=%28endpoint%3Agroups%2Fazure-sydney-user-group%2Fmembers%2Clist%3A%28dynamicRef%3Alist_groupMembers_azure-sydney-user-group_all%29%2Cmeta%3A%28method%3Aget%29%2Cparams%3A%28filter%3Aall%2Corder%3Aasc%2Cpage%3A1%2Csort%3Avisited%29%2Cref%3AgroupMembers_azure-sydney-user-group_all%29&metadata=clickTracking%3A%21t%2Clogout%3A%21f%2Creferrer%3A%2Fazure-sydney-user-group%2Fmembers%2F%2CretainRefs%3A%21%28self%2Cheaders%2Cgroup%2CmemberCounts_azure-sydney-user-group%2CgroupMembers_azure-sydney-user-group_all%29
@sjwaight
sjwaight / SampleCode.cs
Last active March 28, 2023 00:46
Sample Copilot suggestion sample with comments
//CHCP: Start
/*
Model release: x.xxx.xx
Model date: 2023-03-28
Prompt: a function to calculate the sum of two numbers
*/
public int Sum(int a, int b)
{
return a + b;
}
@sjwaight
sjwaight / connection-logic-app-kv-msi.bicep
Created January 3, 2023 04:41
Bicep file snippet showing how to define the MSI to use when connecting to a key vault.
resource connections_keyvault_resource 'Microsoft.Web/connections@2016-06-01' = {
name: connections_keyvault_name
location: resource_group_location
properties: {
displayName: 'KeyVaultMIAccess'
parameterValueType: 'Alternative'
alternativeParameterValues: {
vaultName: key_vault_name
}
customParameterValues: {}
@sjwaight
sjwaight / logic-app-parameters.bicep
Created January 3, 2023 04:29
Logic Apps Parameters section bicep snippet
parameters: {
'$connections': {
value: {
keyvault: {
connectionId: connections_keyvault_resource.id
connectionName: 'keyvault'
connectionProperties: {
authentication: {
type: 'ManagedServiceIdentity'
}
@sjwaight
sjwaight / key-vault.bicep
Created January 3, 2023 04:15
Sample Azure Bicep snippet showing definition of a Key Vault that uses a Managed Identity
resource key_vault_resource 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: key_vault_name
location: resource_group_location
properties: {
sku: {
family: 'A'
name: 'standard'
}
tenantId: subscription().tenantId
accessPolicies: [