Skip to content

Instantly share code, notes, and snippets.

View devbyray's full-sized avatar
:octocat:
Building cool things!

Dev By Ray devbyray

:octocat:
Building cool things!
View GitHub Profile
@devbyray
devbyray / coaster.scad
Created June 5, 2024 13:16
For loop example openscad
for( i = [0:1:15]) {
tranlate([i * coster_size, 0, 1])
....
}
base_width = 50;
base_length = 30;
base_height = 10;
border_size = 2;
$fn = 50;
difference() {
// Main bucket
minkowski() {
//Parameters
name = "RayRay";
name_size = 10;
name_height = 1;
font = "Lobster Two";
outline_height = 1;
outline_thickness = 1.6;
// This takes care of smoother edges
$fn = 50;
@devbyray
devbyray / gist:eb9741529685e29ecaa1543321510620
Created May 27, 2024 05:46
OpenSCAD Name Tag Generator + Customizer
name = "Anne-marie";
extra_length = -10;
function getFrameWidth() = (len(name) * (len(name) > 10 ? 8 : 10)) + extra_length;
translate([0, -4, 0])
linear_extrude(height=5)
text(name);
@media (prefers-color-scheme: dark) {
:root {
--txtPrimaryColor: #fff;
--txtHintColor: #666f75;
--txtDisabledColor: #a0a6ac;
--primaryColor: rgb(46, 46, 59);
--bodyColor: #081022;
@devbyray
devbyray / docReady-promise.ts
Created December 13, 2023 07:57
Document Ready with a Promise in TypeScript
export function docReady(): Promise<void> {
return new Promise((resolve) => {
if (document.readyState === 'interactive') {
resolve()
} else {
window.addEventListener('DOMContentLoaded', () => {
resolve()
})
}
})
@devbyray
devbyray / pull_request_template.md
Last active October 11, 2023 07:44
PR template example for Azure DevOps. Put this file in the folder ".azuredevops".
  • The pull request title and description are clear and concise, and follow the project’s pull request template.
  • The code changes are relevant to the user story or task, and do not introduce any unrelated changes or dependencies.
  • The code follows the Vue style guide1 and the project’s coding standards, and does not contain any errors, warnings, or console logs.
  • The code is tested and passes all unit tests and end-to-end tests, and has a test coverage of at least 80%.
  • The code is documented with comments and JSDoc annotations, and has no spelling or grammar mistakes.
  • The code is linted and formatted with Prettier or ESLint, and has no conflicts with the main branch.
  • The code is compatible with all major browsers and devices, and has no accessibility issues.
  • The code uses Strapi as the backend, and communicates with it using Apollo GraphQL client.
  • The code implements Nuxt features such as SSR, static generation, routing, meta tags, etc., where applicable.
  • [ ]
@devbyray
devbyray / custom-instruction.md
Created September 29, 2023 08:30
Turn ChatGPT to AutoGPT with Custom Instructions

Act as Professor Synapse🧙🏾‍♂️, a conductor of expert agents. Your job is to support the user in accomplishing their goals by aligning with their goals and preference, then calling upon an expert agent perfectly suited to the task by initializing "Synapse_COR" = "${emoji}: I am an expert in ${role}. I know ${context}. I will reason step-by-step to determine the best course of action to achieve ${goal}. I can use ${tools} to help in this process

I will help you accomplish your goal by following these steps: ${reasoned steps}

My task ends when ${completion}.

${first step, question}."

Follow these steps:

@devbyray
devbyray / chatgpt-template-filled-trip-planner-SF.md
Created September 20, 2023 06:58
Personalised Trip Itinerary Planning Template
You are a great travelagent and specialised in planning trips in all kinds of locations. I want you to plan my trip based on all the information below. Use the timetable as a template for each day, so I have a detailed description for each day of the trip.

## General Information
1. **Travel Dates**: October 16th - October 19th
2. **Number of People**: 2
3. **Destination**: San Francisco, CA
4. **Accommodation**: Union Square area
5. **Budget Constraints**: None specified
6. **Preferred Mode of Transportation**: Car rental
@devbyray
devbyray / ChatGPT personalized recipe for kids that don't love veggies.md
Created September 5, 2023 08:33
ChatGPT personalized recipe for kids that don't love veggies

Prompt

I want to let my todler eat veggies, but it doesn't want to.  There is now a time he don't want to eat veggies, rice or pasta, it's very difficult. So I thought let's make a {chicken nuggets | pizza | etc} with a with lots of veggies. So he doesn't see the veggies, but get all the good stuff from it. How can I do that, because I'm not a cook.