Skip to content

Instantly share code, notes, and snippets.

View PaulKinlan's full-sized avatar
🐤
Chillax-in

Paul Kinlan PaulKinlan

🐤
Chillax-in
View GitHub Profile
@hourianto
hourianto / README.md
Last active September 17, 2024 01:19
Current prompts for WebSim (as of July 13, 2024)

Current WebSim prompts and main context. System/User/Assistant blocks denote different roles in the messages array for the API requests. Stuff in {} is either a file that's too big to be inserted directly, or an explanation.

From what I can see, WebSim is mostly "carried" by Claude's creativity.

  • Main prompt: main_prompt.txt - also check main_flow.txt to see how a complete request is made.
  • Edit prompt: edit_prompt.txt- used when right-click editing the element. Uses the currently selected model. I didn't manage to get the whole prompt with the examples, but most of it at least.
  • Fake LLM API prompt: api_prompt.txt - currently WebSim always uses Claude 3.5 Sonnet for this (from info on Discord).
  • Image rewriting prompt: image_gen_prompt.txt - also uses Claude (don't know what model). Not sure what image model is being used, probably some version SDXL (like SDXL Turbo and similar)

The temperature used is 1, at least for Claude.

Shortcuts API Specification

This explainer is for the Shortcut API

Introduction

Some platforms like Windows and Android have ways to add menu items to the app launcher icon itself, here after called shortcuts. These can perform certain app actions. On Android in addition, you can drag these shortcuts to the homescreen.

@triblondon
triblondon / README.md
Last active August 29, 2015 14:13
Edge conf 5: London 2015

#Early draft of Edge conf 5

This was a discussion of the schedule for Edge 5, which is now finalised, and the information below is out of date. See the website for current details.

##Format

Edge 5 will feature a single track of 4 sequential panel discussions on topics of universal importance and topicality to the web community, followed by lunch and then 12 breakout sessions across 4 tracks, in which face to face discussions of specific current and future web topics can be had in boardroom style with groups of up to 50.

/**
* Get requestAutocomplete data. Can only be called as part of an interaction event
* listener such as mouse up/down, click, key & touch.
*
* @param {{billing: boolean, shipping: boolean}} opts
* If billing is true, credit card & billing address details will be requested.
* If shipping is true, a shipping name & address will be requested.
* @param {function(response:Object<string, string>)} callback [description]
* You callback is passed a single response object in this format:
* {
@addyosmani
addyosmani / headless.md
Last active May 17, 2024 03:38
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

var i = new Intent({
"action": "http://webintents.org/save",
"type": "image/*",
"data": blob
})
var onsuccess = function(data) {
var img1 = document.getElementById("img1");
img1.src = URL.createObjectURL(data);
};
@ahmednuaman
ahmednuaman / detect_if_dom_is_ready.js
Created March 8, 2011 16:52
Using document.readyState to see if the DOM is ready
var timer = setInterval( function()
{
if ( /loaded|complete/.test( document.readyState ) )
{
clearInterval( timer );
// go!
}
}, 10 );
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||