Skip to content

Instantly share code, notes, and snippets.

View Overdrive141's full-sized avatar

Farhan H Overdrive141

View GitHub Profile
export const chaosTestStrings = (): void => {
const textNodes = getAllTextNodes(document.body);
for (const node of textNodes) {
const textNodeLength = node.textContent ? node.textContent.length : 0;
if (node.textContent === null) {
return;
}
if (node.parentElement instanceof Element) {
if (node.parentElement.dataset.originalText === undefined) {
@Overdrive141
Overdrive141 / pascalTriangle.js
Created July 10, 2023 09:53
Pascal Triangle - Challenge
/**
Instructions
Compute Pascal's triangle up to a given number of rows.
In Pascal's Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row.
1
1 1
1 2 1
1 3 3 1
@Overdrive141
Overdrive141 / main.py
Created April 19, 2023 09:43 — forked from ploeber/main.py
vocode script
import asyncio
import signal
import vocode
from vocode.streaming.streaming_conversation import StreamingConversation
from vocode.helpers import create_microphone_input_and_speaker_output
# Transcriber
from vocode.streaming.models.transcriber import AssemblyAITranscriberConfig
from vocode.streaming.transcriber.assemblyai_transcriber import AssemblyAITranscriber
@Overdrive141
Overdrive141 / agent_with_custom_tool.ipynb
Created April 19, 2023 03:25 — forked from virattt/agent_with_custom_tool.ipynb
agent_with_custom_tool.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Overdrive141
Overdrive141 / 0.md
Created December 21, 2022 04:05 — forked from max-mapper/0.md
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

@Overdrive141
Overdrive141 / API.md
Created November 25, 2022 18:13 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: