Skip to content

Instantly share code, notes, and snippets.

View leenattress's full-sized avatar
🎯
Generally Smashing It

Lee Nattress leenattress

🎯
Generally Smashing It
View GitHub Profile
@leenattress
leenattress / README.md
Created October 3, 2023 09:45
NodeJs OpenAI in the terminal.

Give the chatbot your OpenAI key like this:

export OPENAI_API_KEY=zxzxzxzxzxzxzxzxxzxz

Install the deps:

npm install

Run it:

@leenattress
leenattress / perlinTest.js
Created May 4, 2020 19:15
PixelBox Perlin Experiements
class Perlin {
constructor() {}
noise(x, y, z) {
var p = new Array(512);
var permutation = [ 151,160,137,91,90,15,
131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
actorData = {
tank = {1,2,3,4,5,6,7,8}
}
--a is angle
for i=1,8 do
if (actorData.tank[i]) then
spra(a,actorData.tank[i],x,y-i)
end
end
@leenattress
leenattress / command.js
Last active May 13, 2019 20:09 — forked from JamieBuckell/command.js
Login with speed
Cypress.Commands.add('login', (email, password) => {
cy.request({
method: 'POST',
url: 'http://localhost:5000/api/1.0/user/auth?tenant=greatrun&cb=1557776611205',
body: {
emailAddress: email,
password: password,
}
})
.then((resp) => {
@leenattress
leenattress / README.md
Last active April 30, 2019 12:10
SCRIPT-8
function _init()
hexchar="0123456789abcdef"
function hex(x)
x=flr(x)+1
return sub(hexchar,x,x)
end
charhex={}
for i=1,16 do
@leenattress
leenattress / pico8_vector_test.lua
Last active September 15, 2017 22:57 — forked from anonymous/pico8_vector_test.lua
pico8_vector_test
function _init()
hexchar="0123456789abcdef"
function hex(x)
x=flr(x)+1
return sub(hexchar,x,x)
end
charhex={}
for i=1,16 do