Skip to content

Instantly share code, notes, and snippets.

View nloadholtes's full-sized avatar
👍
here

Nick Loadholtes nloadholtes

👍
here
View GitHub Profile
@nloadholtes
nloadholtes / healthy.py
Created April 10, 2024 19:01
When you just want to return 200 no matter what
import http.server
import socketserver
import json
PORT = 8000
class RequestHandler(http.server.SimpleHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'application/json')
@nloadholtes
nloadholtes / README.md
Created May 20, 2022 18:01 — forked from johnie/README.md
Filter Phish – This Google Apps Scripts filter will automatically move all future emails with the header `X-PHISHTEST` to trash.

Filter Phish

This Google Apps Scripts filter will automatically move all future emails with the header X-PHISHTEST to trash.

Getting started

  1. Go to Google Apps Script
  2. Add a new script and copy paste the content from the sibling file
  3. Test run the script, go to View in the menu bar and click Logs
  • If there's no errors it should be blank, OR a verbose message that it removed a phishing email.
@nloadholtes
nloadholtes / santa_picker.py
Created December 4, 2019 03:12
For picking people
def picker(giver, reciever):
for x in giver:
recv = None
while not recv or recv is x:
random.shuffle(people)
recv = people[0]
people.pop(0)
print("%s gives to %s" % (x, recv))
@nloadholtes
nloadholtes / main.py
Created December 24, 2018 05:08
SentimentalGreenyellowPattern created by nloadholtes - https://repl.it/@nloadholtes/SentimentalGreenyellowPattern
test_data = """/->-\\
| | /----\\
| /-+--+-\ |
| | | | v |
\\-+-/ \\-+--/
\\------/
"""
class Cart():
def __init__(self, x, y, facing, cart_id):
@nloadholtes
nloadholtes / main.py
Created December 22, 2018 03:47
AdmiredFailingLicense created by nloadholtes - https://repl.it/@nloadholtes/AdmiredFailingLicense
test_data="""2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2"""
def parse(z, d, output):
while z < len(d)-1:
n = Node(int(d[z]), int(d[z+1]))
output.append(n)
z += 2
if n.child_qty > 0:
x = 0
while x < n.child_qty:
@nloadholtes
nloadholtes / data.txt
Created December 21, 2018 13:01
DesertedNonstopLoop created by nloadholtes - https://repl.it/@nloadholtes/DesertedNonstopLoop
#1 @ 45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bQqEeUmMuDTfHQoOqtTCuUchebBEPvVpouUbBOXxvVzZEHhVvyYYySsetiIThHQqEsSAaVNnLlnNAwHhAIiXxaNnaAW
@nloadholtes
nloadholtes / main.clj
Created December 14, 2018 00:38
IntrepidSubduedDatasets created by nloadholtes - https://repl.it/@nloadholtes/IntrepidSubduedDatasets
;; Enter your code here. Read input from STDIN. Print output to STDOUT
;;
;;
;; Sample data
;;
;;4
;;0 0
;;0 1
;;1 1
;;1 0
@nloadholtes
nloadholtes / data.txt
Created December 14, 2018 00:36
AliceblueMiniModularity created by nloadholtes - https://repl.it/@nloadholtes/AliceblueMiniModularity
Step G must be finished before step X can begin.
Step X must be finished before step B can begin.
Step A must be finished before step I can begin.
Step D must be finished before step H can begin.
Step O must be finished before step T can begin.
Step H must be finished before step C can begin.
Step S must be finished before step E can begin.
Step U must be finished before step M can begin.
Step M must be finished before step Z can begin.
Step R must be finished before step N can begin.