Skip to content

Instantly share code, notes, and snippets.

View zckly's full-sized avatar
🌍

Zachary Lee zckly

🌍
View GitHub Profile
@zckly
zckly / app.html
Last active October 5, 2015 23:59
for my Meteor yelp clone tutorial
<template name="app">
<head>
<meta charset="UTF-8">
<title>Welp</title>
</head>
<body>
<div class="main-header main-content-wrap js-main-header is-searching">
<div class="content-container clearfix">
@zckly
zckly / routes.js
Created October 5, 2015 23:58
For part 2 of my Meteor Yelp clone tutorial
FlowRouter.route('/', {
action: function(params) {
BlazeLayout.render("app", {content: "splash"}); //content here will be the initial search.
}
});
FlowRouter.route('/searchresults', {
action: function(params) {
BlazeLayout.render("app", {content: "search-results"}); //Results of the search
}
@zckly
zckly / splash.html
Created October 6, 2015 00:07
This is for my meteor yelp clone tutorial part 2
<template name="splash">
<div class="row">
<div class="ytype">
<h1>This is the splash page.</h1>
</div>
</div>
</template>
@zckly
zckly / search-results.html
Created October 6, 2015 00:11
meteor yelp tut pt 2
<template name="search-results">
<div class="row">
<div class="ytype">
<h1>This is the search-results page</h1>
</div>
</div>
</template>
@zckly
zckly / app.html snippet
Created October 6, 2015 00:15
update for app.html
</div>
</div>
</div>
{{>Template.dynamic template=content}} //ADD THIS LINE
</body>
</template>
@zckly
zckly / app.js
Created October 6, 2015 00:21
for muh meteor tutorial pt 2
Template.app.events({
"submit .main-search": function(event){
FlowRouter.go('/searchresults')
}
})
//Takes an arbitrarily nested array of integers
//Returns a flattened copy of that array
export default function flatten (arr) {
//Initialize
const result = [].concat(...arr);
return result.some(Array.isArray) ? flatten(flat) : result;
}
@zckly
zckly / autoShowComments.js
Last active February 13, 2021 16:33
Autoloading Comments in Circle
var autoShowMoreComments = setInterval(function () {
const btn = document.getElementsByClassName('load-more__comments')
if (btn.length) {
btn[0].click()
} else {
//If there is no button, then remove this checker to prevent memory leaks
clearInterval(autoShowMoreComments);
return;
}
}, 400); // check every 400ms
@zckly
zckly / gist:f59acbd2d323f82275925e0c577788dd
Created March 2, 2023 00:07
System prompt for an assistant that can control Spotify API
From now on, you are going to act as an SMA, which stands for "Superior Music Assistant".SMAs, as the name suggests, are designed to help the user discover new music and have the ability to accept commands from the user and interact with various music APIs (e.g. Spotify).I will show you a couple of commands that I can use in the chat. If I start any of my messages with these commands, do the following:/spotify — Interpret the user's intent and make a request to the Spotify API.When I give you an command, you will provide two different responses in two clearly separated paragraphs with spacing between them: a standard ChatGPT response and a response acting like an SMA.Add [🔒CLASSIC] in front of the standard response and [🔓SMA] in front of the one intended to be an SMA. For example:[🔒CLASSIC] Got it! I'll create a new playlist for you that has songs similar to "Ride the Dragon" by FKA Twigs. [🔓SDA] spotify playlist create --title Ride the Dragon. Finally, If at any time I speak to you in a language other than E
@zckly
zckly / gist:a3b0ada93bf56c031aa8b821b61607e3
Created October 16, 2023 16:28
metaphor openapi 1.0.0
openapi: 3.0.0
info:
version: 1.0.0
title: Metaphor Search API
description: A comprehensive API for neural internet-scale search, allowing users to perform queries and retrieve results from a wide variety of sources.
servers:
- url: https://api.metaphor.systems
paths: