Skip to content

Instantly share code, notes, and snippets.

View taivu's full-sized avatar

Tai taivu

View GitHub Profile
@taivu
taivu / prompt-builder-template.md
Created August 27, 2025 21:58 — forked from skozz/prompt-builder-template.md
Prompt builder to force IAs to help you improve your own prompts before starting

What is this?

It is a simple MD to force LLMs to help you build your own prompts following Anthropic'sinternal prompt engineering template Inspired by https://www.reddit.com/r/PromptEngineering/comments/1n08dpp/anthropic_just_revealed_their_internal_prompt/

How to use

  • Add this file to your proyect
  • Invoke this MD in the LLM context
  • Ask to model: "help me write a prompt following this process" + draft of your prompt

Then the model is goign to ask you the template questions to help you build the final prompt based on the template.

@taivu
taivu / JS-libraries.md
Last active March 20, 2025 15:53
Links to Stuff
@taivu
taivu / EloquentUser.php
Created August 21, 2024 14:40 — forked from Artistan/EloquentUser.php
Paginator with relations... load the relations on the model
<?php
namespace App;
use Illuminate\Pagination\LengthAwarePaginator;
use App\Http\Controllers\Controller;
class EloquentUser extends Controller {
// these will work for eloquent, but not with a scout->search since scout is not building a query.
public function paginate($query)
@taivu
taivu / Dnsmasq.md
Last active July 26, 2021 19:00
Ol' Reliable DNSMASQ Config
// IMPORTS
const fs = require('fs').promises;
const parse = require('csv-parse/lib/sync');
const stringify = require('csv-stringify');
// READ
(async function () {
let dataClient = [];
let dataLatest = [];
const completeData = [];
@taivu
taivu / drupal-fix-permission-flags.sh
Created May 12, 2020 14:08
Drupal File Directory Permissions
# Sometimes copying files directly from a vagrant sandbox will results in all files and directories being 777
# These two commands will make every file and directory under the current working directory have normal permission flags.
# These commands should be run in the `/private_files` and `/pub/sites/default/files` folder.
#
# Directories: rwxrwxr-x
# Files: rw-rw-r--
find . -type d -exec chmod 0775 {} +
find . -type f -exec chmod 0664 {} +
@taivu
taivu / pb-207.md
Last active May 1, 2020 23:15
Blazer pb-207 info

Blazer pb-207 info

Re: Cleaning a Blazer PB-207?

There are several versions (here's one): Often the flame decreases in size after the first refill and may fail to ignite on the high setting. I top them up with gas which affects the pressure and usually results in a smaller flame. I then adjust them before selling. The adjustment is made inside the torch and is not really meant to be done by the owner but it can be done with a bit

@taivu
taivu / 01_createfiles.config
Created May 1, 2020 03:04 — forked from slenky/01_createfiles.config
AWS Elastic Beanstalk -- Let's Encrypt for load-balanced environments
files:
"/home/ec2-user/set_env.sh":
mode: "000755"
owner: root
group: root
content: |
instance_id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
region=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}')
ebenvname=$(aws --output text ec2 describe-tags --region $region --filters "Name=resource-id,Values=${instance_id}" "Name=key,Values=elasticbeanstalk:environment-name" | awk '{print $5}')
@taivu
taivu / Download-Shopify-CDN-Assets.md
Created March 27, 2020 19:59 — forked from ridem/Download-Shopify-CDN-Assets.md
Download all Shopify CDN assets from a store

Instructions

  1. Go to your Shopify admin/settings/files page
  2. Open your browser Dev tools, go to the console

Then, depending on the option you choose:

Option 1 - Download all the files directly (might crash you browser)

  1. Make sure your browser is set to download files automatically and doesn't ask for the download location every time
@taivu
taivu / 1-server.md
Created February 20, 2020 20:41 — forked from dragonjet/1-server.md
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password