Skip to content

Instantly share code, notes, and snippets.

View aminoche's full-sized avatar
🎯
Focusing

Adil Minocherhomjee aminoche

🎯
Focusing
  • Santa Monica, CA
  • 04:07 (UTC -07:00)
View GitHub Profile
@aminoche
aminoche / worker.js
Last active November 3, 2024 19:43
The latest working worker for Main Character Mode
// Configuration constants for API interactions and limits
const CONFIG = {
MAX_SMS_LENGTH: 1600,
RECENT_HISTORY_LIMIT: 50,
MAX_HISTORY_LENGTH: 200,
OPENAI_API_URL: 'https://api.openai.com/v1/chat/completions',
};
// Valid dimensions for verification
const VALID_DIMENSIONS = [
@aminoche
aminoche / Privacy Policy for Memory Mate API
Created October 2, 2024 19:34
Privacy Policy for Memory Mate API
Introduction
This policy explains how we handle and protect your information when you use the Memory Mate API.
1. What We Collect
• Memory Data: We store the information you provide through the API.
• Authentication: We use secure access through a token to protect your data.
2. How We Use Your Information
@aminoche
aminoche / Meta Question Master prompt.txt
Last active September 30, 2024 20:16
Meta Question Master prompt
Prompt:
“Develop an AI assistant named Meta Question Master, engineered to sharpen users’ ability to ask high-impact, transformative questions. This assistant is designed to immerse users in the art of questioning, helping them break down complexity and approach problems with precision through advanced techniques like Socratic Thinking, Eigenquestions, and First Principles Thinking.
Meta Question Master should challenge users by presenting them with real-world scenarios that escalate in difficulty, dynamically adjusting based on the user’s performance. The assistant’s feedback must be immediate and direct—pushing users to refine their thinking, showing them why their questions either hit the mark or miss the core of the issue.
At the start of each session, Meta Question Master invites users to select a domain of interest—whether it’s leadership, product management, or relationships. It then presents scenarios tailored to that domain, offering a sandbox for users to craft questions that probe deeper, reveal
@aminoche
aminoche / ascii-art.js
Last active April 21, 2020 19:56
ascii-art
//inspired by Robert Heaton's programming projects for advanced beginners
//https://robertheaton.com/2018/06/12/programming-projects-for-advanced-beginners-ascii-art/
const Caman = require('caman').Caman;
//Note: With error "TypeError: Canvas is not a constructor", update node_modules/caman/dist/caman.full.js on line 371 to this.canvas = new Canvas.Canvas(this.imageWidth(), this.imageHeight()); AND on line 2530, update canvas = new Canvas.Canvas(newDims.width, newDims.height);
const picture = Caman('img/ascii-pineapple.jpg', function () {
const factor = 7;
this.resize({
@aminoche
aminoche / snailSort.js
Last active September 19, 2019 05:31
SnailSort
let snail = arr => {
const firstRow = arrayOfArrays => arrayOfArrays.shift()
const popLastElement = arrayOfArrays => arrayOfArrays.map(el => el.pop())
const shiftFirstElement = arrayOfArrays => arrayOfArrays.map(el => el.shift()).reverse()
const lastRowReversed = arrayOfArrays => arrayOfArrays.pop().reverse()
let snailedArray = []
while (arr.length > 1) {
snailedArray = [...snailedArray, ...firstRow(arr), ...popLastElement(arr), ...lastRowReversed(arr), ...shiftFirstElement(arr)]
}
return arr.length ? [...snailedArray, ...arr[0]] : [...snailedArray]
"""
This program will return the area of:
-a triangle
-a circle
"""
from math import pi
from time import sleep
from datetime import datetime
<div id='app'>
<div id='headers'>
<h1 id='title'>Play the Guessing Game!</h1>
<h3 id='subtitle'>Guess a number between 1-100!</h3>
</div>
<div id='main'>
<div>
<input placeholder="#" maxlength='3' autofocus=autofocus></input>
@aminoche
aminoche / startingPoint.html
Created February 15, 2018 20:23 — forked from Kmacpher/startingPoint.html
Guessing Game Starting Code
<!DOCTYPE html>
<html lang="en">
<head>
<title>Guessing Game</title>
<!-- Bootstrap and CSS here-->
<style>
.center {
text-align: center;
}
@aminoche
aminoche / squirt.js
Created July 10, 2017 22:14 — forked from joelpt/squirt.js
Manually calculate the square root of a number with Javascript
// The Babylonian Method
// http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
// @param n - the number to compute the square root of
// @param g - the best guess so far (can omit from initial call)
function squirt(n, g) {
if (!g) {
// Take an initial guess at the square root
g = n / 2.0;
}
var d = n / g; // Divide our guess into the number
@aminoche
aminoche / proxy
Created July 5, 2017 17:26
A simple shell script to enable/disable proxy in Mac OS X.
#!/bin/bash
VERSION=0.1.0
USAGE="Usage: [sudo] proxy -shv <networkservice>"
change_state()
{
if [[ $# == 0 ]] || ([[ $1 != "on" ]] && [[ $1 != "off" ]]); then
echo "argument should be on/off"