Skip to content

Instantly share code, notes, and snippets.

View eddie-knight's full-sized avatar
:shipit:

Eddie Knight eddie-knight

:shipit:
View GitHub Profile
import hazelcast
import openai
# Start the Hazelcast Client and connect to an already running Hazelcast Cluster on 127.0.0.1
client = hazelcast.HazelcastClient()
# Get a Distributed Map called "inputs"
inputs_map = client.get_map("inputs").blocking()
# Function to handle incoming user input
def handle_input(input_string):
@eddie-knight
eddie-knight / CLODevWorkflow.md
Last active July 10, 2023 16:51
2022 CNCF Security Slam

CLOMonitor Development Workflow

CLOMonitor.io is a great dashboard for checking your project's progress. It reruns once an hour if repository changes are detected.

How is your CNCF project is configured for clomonitor.io?

If you would like to review or modify the checks that are being made for your project, check out the CNCF configuration file for CLOMonitor.io: https://github.com/cncf/clomonitor/blob/main/data/cncf.yaml

This YAML file will specify which projects are checked, which repos are considered as part of each project, and which subset of checks are executed for each repo.

@eddie-knight
eddie-knight / Prompt.md
Last active June 28, 2022 17:51
Python Interview - Microwave

The Microwave

Within one hour, design and implement the behavior of a microwave oven.

It has a numeric keypad and a START button. You are responsible for the logic triggered when any of these buttons is pressed.

  • Pressing a numeric key sends your code one digit.
  • Pressing START tells your code to start "cooking".

This microwave is not fancy. It cannot be stopped or paused once started. Input cannot be cleared. There is no “quick cook” option.

import csv
## Player Weapons
#################
# 2h Weapons Note!
# two-handed weapons disable usage of the multi-tool (grapple, interact, repair, etc)
# Melee weapons are special two-handed weapons that specialize in ship DEFENSE
anchors:
tf_init: &tf_init |
terraform init -lock=false \
-backend-config="resource_group_name=terraform" \
-backend-config="key=${{ env.TF_BACKEND_KEY }}" \
-backend-config="access_key=${{ secrets.TF_BACKEND_ACCESS_KEY }}" \
-backend-config="storage_account_name=${{ secrets.TF_BACKEND_SA }}"
setup_backend_key: &setup_backend_key "githubdeployment.${{ github.event.inputs.environment }}.aks_setup.terraform.tfstate"
configure_backend_key: &configure_backend_key "githubdeployment.${{ github.event.inputs.environment }}.aks_configure.terraform.tfstate"
import random
class deck_builder():
suit = [
"A", "K", "Q", "J",
"10", "9", "8",
"7", "6", "5",
"4", "3", "2"
]
@eddie-knight
eddie-knight / fetcher.py
Last active May 11, 2020 18:02
Simple request helper
import requests
from bs4 import BeautifulSoup, element
class Fetcher():
def __init__(self, base, endpoint=None):
self.base = base
self.endpoint = endpoint
def url(self):
@eddie-knight
eddie-knight / filecloud-admin-api-settings.yml
Created May 3, 2019 17:42
Settings Parameter Names for the Filecloud Admin API
---
#
# Settings Parameter Names for the Filecloud Admin API
# For reference:
# https://medium.com/@eddieknight_1896/filecloud-api-getting-started-56b1ec25e3c2
# https://www.getfilecloud.com/apidocs/fcadmin/adminapi/doc/index.html#api-Settings_Related_API
#
admin_settings:
# Server Settings
- TONIDOCLOUD_SERVICENAME
using UnityEngine;
using System.Collections.Generic;
using UnityEditor;
public class CloneGameObject : ScriptableWizard
{
public GameObject firstObjectToClone;
public GameObject secondObjectToClone;
public GameObject parentObjectForClones;
public int xCount = 1;
@eddie-knight
eddie-knight / security.groovy
Created January 24, 2019 21:52
Example Security.groovy (Just needs the referenced user and pass files)
#!groovy
import jenkins.model.*
import hudson.security.*
import jenkins.security.s2m.AdminWhitelistRule
import hudson.security.csrf.DefaultCrumbIssuer
import jenkins.security.s2m.AdminWhitelistRule
def instance = Jenkins.getInstance()