- 😄
:smile:
- 😆
:laughing:
- 😊
:blush:
- 😃
:smiley:
- 😀
:grinning:
- 😏
:smirk:
- 😍
:heart_eyes:
- 😘
:kissing_heart:
- 😚
:kissing_closed_eyes:
- 😳
:flushed:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A quick and simple JS WHOIS lookup to return JSON | |
* Docs and usage instructions are below... | |
**/ | |
import * as whois from 'whois'; | |
import * as changeCase from 'change-case'; | |
import { decodeEntity } from 'html-entities'; | |
const DELIMITER = ':'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A REST API for fetching the repsponse from | |
* a custom GPT assistant via the OpenAI API | |
* Deployed as a simple Cloudflare Worker | |
* Licensed under MIT (C) Alicia Sykes 2024 | |
*/ | |
(() => { | |
addEventListener("fetch", (event) => { | |
event.respondWith(handleRequest(event.request)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch all comments on a given GitHub discussion | |
* A simple REST API, built for Cloudflare Workers | |
* Code licensed under MIT, (C) Alicia Sykes 2024 | |
*/ | |
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
async function handleRequest(request) { | |
const { pathname } = new URL(request.url); | |
const username = pathname.split('/')[1]; | |
if (!username) { | |
return new Response( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
async fetch(request, env) { | |
// Extract username and repo from the URL path | |
const url = new URL(request.url); | |
const pathSegments = url.pathname.split('/').filter(Boolean); | |
if (pathSegments.length !== 2) { | |
return new Response('URL must be in the format /{username}/{repo}', { status: 400 }); | |
} | |
const [username, repo] = pathSegments; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cloudflare Worker script for displaying UK food products | |
* Fetches given item from Tesco.com using search endpoint | |
* Optionally resizes to specified dimensions | |
* Implements caches recently requested images | |
* Swaers a little bit when an error happens | |
*/ | |
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request, event)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Access control headers */ | |
const headers = { | |
'Access-Control-Allow-Origin': '*', | |
'Access-Control-Allow-Methods': 'GET, PUT, POST, OPTIONS', | |
'Access-Control-Allow-Headers': 'Content-Type', | |
'content-type': 'application/json;charset=UTF-8', | |
} | |
/* Listen for incoming requests, and call handler */ | |
addEventListener('fetch', event => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Page meta info, like heading, footer text and nav links | |
pageInfo: | |
title: Dashy | |
description: Welcome to your new dashboard! | |
navLinks: | |
- title: GitHub | |
path: https://github.com/Lissy93/dashy | |
- title: Documentation | |
path: https://dashy.to/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Date : 22 Oct 2012 | |
@author : Alicia Sykes | |
''' | |
#Remove Bad Characters | |
def validate(cardNumber): | |
validCardNumber = "" | |
for number in cardNumber: | |
if (ord(number)>=48 and ord(number)<=57): validCardNumber += str(number) |
NewerOlder