Skip to content

Instantly share code, notes, and snippets.

View adamgins's full-sized avatar

adamgins

View GitHub Profile
@adamgins
adamgins / buzzyai_api_create_with_prompt.mjs
Last active July 18, 2024 00:19
Batch Create with API - no wait/throttle
import axios from "axios";
const N = 5; // Number of times to repeat the request
let data = JSON.stringify({
userEmail: "adam.ginsburg@buzzy.buzz",
appPrompt:
"Create an app for the company 'Treuhand A online' The company has the following description: 'A finance consulting company that helps customers do their accountings and optimizing taxes' The app is used in the following situation or is intended to solve the following problem: 'It always takes a lot of time to setup the account numbers and descriptions for new clients, even though they are very similar for everyone.' This is the idea of how the app should look: 'A finance accounting software that lets the owner manage the accounting for it's clients.' call the app testfin2",
});
@adamgins
adamgins / aitrategyplan-aws-lambda-1.js
Last active June 19, 2024 05:26
Example AWS Lambda Function for the app.aistrategyplan.com to create orgs, teams, generate recomemndations
import axios from "axios";
import _ from "lodash";
import Bottleneck from "bottleneck";
import {
getUserID,
insertMicroAppRow,
getMicroAppDataRow,
getMicroAppData,
updateMicroAppDataRow,
errorResponse,
@adamgins
adamgins / buzzy_html_example_1.html
Created May 20, 2023 22:42
Buzzy Example - HTML field call OpenAI to generate recipes
<!DOCTYPE html>
<html>
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
Adams-MacBook-Pro:buzzy7 adamginsburg$ npm ls
buzzy7@1.0.2 /Users/adamginsburg/Documents/development/buzzy7
├─┬ @babel/runtime@7.8.3
│ └── regenerator-runtime@0.13.3
├─┬ @firebase/messaging@0.3.5
│ ├── @firebase/messaging-types@0.2.3
│ ├─┬ @firebase/util@0.2.1
│ │ └── tslib@1.9.0 deduped
│ └── tslib@1.9.0
├── acorn@6.1.1
Adams-MacBook-Pro:buzzy7 adamginsburg$ docker build -t buzzybuzz/buzzy-main .
Sending build context to Docker daemon 117MB
Step 1/2 : FROM abernix/meteord:node-8.16.1-onbuild
# Executing 4 build triggers
---> Using cache
---> Running in 83ac5b3d9022
Downloading Meteor distribution
Meteor 1.9 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
@adamgins
adamgins / gist:3c2a91257b83747d98a7
Created February 29, 2016 21:57
How to insert a Buzz into your site using an iFrame
Insert the following code into your site:
<iframe src="<url to buzz>" width="100%" height="800px">
For example:
<iframe src="https://buzzy.buzz/go/9c0d088c730ef78423bff17a" width="100%" height="800px">
addComment: function(commentStuff) {
var user = Meteor.user();
var submittedDate;
if (Meteor.isClient){
submittedDate = TimeSync.serverTime();
} else {
submittedDate = new Date().getTime();
}
comment = _.extend(_.pick(commentStuff, 'message','parentID'), {
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 80000
#debug
#quiet
user haproxy
group haproxy
stats socket /tmp/haproxy.sock
var Vimeo = Meteor.npmRequire('vimeo-api').Vimeo;
var lib = new Vimeo("XXXXXXX", "YYYYYY", "ZZZZZ");
/*var scopes = ["public","private","purchased","create","edit","delete","interact","upload"];
var state = Random.id();
var redirect_uri = "http://localhost:3000/_oauth/vimeo"
var url = lib.buildAuthorizationEndpoint(redirect_uri, scopes, state);
console.log("vimeo url",url);*/
lib.streamingUpload('/Users/adamginsburg/Movies/IMG_1334.MOV', function (error, body, status_code, headers) {
option_settings:
- option_name: AWS_SECRET_KEY
value: <SOMESECRET>
- option_name: AWS_ACCESS_KEY_ID
value: <SOMEKEY>
- option_name: PORT
value: 8081