This file contains hidden or 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
{ | |
"openapi": "3.0.2", | |
"info": { | |
"title": "teachable-public-api", | |
"description": "The documentation for the Teachable Public API. All endpoints are currently\nsubject to change.", | |
"version": "0.0.1" | |
}, | |
"paths": { | |
"/v1/courses": { | |
"get": { |
This file contains hidden or 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
# Use specific version for better reproducibility | |
FROM mcr.microsoft.com/playwright:v1.42.1 | |
# Set build arguments for non-sensitive configurable values | |
ARG RESOLUTION=1920x1080 | |
ARG VNC_PORT=5901 | |
# Set environment variables | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
DISPLAY=:1 \ |
This file contains hidden or 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
// incomplete - better-auth letta identity based adapter | |
import type { LettaClient } from "@letta-ai/letta-client"; | |
import { Identity, IdentityProperty } from "@letta-ai/letta-client/api"; | |
import { generateId } from "better-auth"; | |
import type { | |
Account, | |
Adapter, | |
BetterAuthOptions, | |
Session, | |
User, |
This file contains hidden or 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
# Define variables | |
EC2_INSTANCE_IP = <EC2_instance_IP> | |
RDS_INSTANCE_IP = <RDS_instance_IP> | |
USERNAME = <username> | |
PASSWORD = <password> | |
DATABASE_NAME = <database_name> | |
DUMP_FILE = dump.sql | |
# Define the export and import commands | |
export: |
This file contains hidden or 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
# ################################################################################ | |
# # Install AWS CLI | |
RUN apk add --no-cache python3 py3-pip | |
RUN pip3 install --break-system-packages --upgrade pip | |
RUN pip3 install --break-system-packages awscli | |
ARG AWS_REGION | |
ARG AWS_ACCESS_KEY_ID | |
ARG AWS_SECRET_ACCESS_KEY | |
ARG AWS_BUCKET |
This file contains hidden or 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
@echo off | |
setlocal enabledelayedexpansion | |
rem Define arrays for paths and targets | |
set "Dirs[0]=PATH_TO_IMAGE_DIRECTORY" | |
set "Dirs[1]=PATH_TO_LOGOS_DIRECTORY" | |
set "Dirs[2]=PATH_TO_SVG_DIRECTORY" | |
set "Dirs[3]=PATH_TO_IMG_DIRECTORY" | |
set "Targets[0]=TAEGET_IMAGE_DIRECTORY" |
This file contains hidden or 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
// Github: ahmedrowaihi | |
// HOW TO USE: | |
// OPEN THE browser console | |
// Press [CTRL + SHIFT + I] | |
// THEN COPY PASTE THE CODE BELLOW TO THE CONSOLE AND HIT [ENTER] | |
const elements = Array.from(document.all).filter(element => element.id.endsWith('rbAnswer')); | |
elements.forEach(element => { | |
const radioButtons = element.querySelectorAll('input[type="radio"]'); | |
This file contains hidden or 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 function indecator() { | |
const spinner = ['-', '\\', '|', '/'] | |
let i = 0 | |
let interval | |
return { | |
stop(string) { | |
if (interval) clearInterval(interval) | |
if (string) process.stdout.write(`${string}\n`) |
This file contains hidden or 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
const fs = require("fs"); | |
const binlogFile = "allbinglog.sql"; // bin log file name | |
const db = ""; // db name | |
const table = ""; // table | |
const outputFile = "output.sql"; | |
const pattern = new RegExp( |
This file contains hidden or 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
function mysqlInsertToEloquent(model, raw, excludeKey = [], excludeValue = []) { | |
const tableName = raw.match(/(?<=INSERT INTO `)(.*?)(?=`)/)[0]; | |
const columns = raw.match(/(?<=\()(.+?)(?=\))/)[0].split(",").map(c => c.trim().replace(/`/g, '')); | |
const values = raw.match(/(?<=VALUES \()(.*?)(?=\);?$)/)[0].split("),("); | |
let record = ''; | |
values.forEach(val => { | |
const modelData = {}; | |
const vals = val.split(","); |
NewerOlder