Skip to content

Instantly share code, notes, and snippets.

View taivu's full-sized avatar

Tai taivu

View GitHub Profile
@skozz
skozz / prompt-builder-template.md
Last active October 10, 2025 10:33
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 / dnsmasq.md
Created August 5, 2019 13:42
cw dnsmasq setup

install the stuff

brew update
brew install dnsmasq
brew tap caskroom/cask
brew cask install virtualbox
brew cask install vagrant
brew cleanup
@fmfpereira
fmfpereira / gist:4186d4e40b09b2b49f2a4c91576be78c
Created December 18, 2017 18:02
Remove uuid, _core and default_config_hash from Drupal 8.x profile install config files.
sed -i "/^uuid:/d;/^_core:/d;/^ default_config_hash:/d" *
@ridem
ridem / Download-Shopify-CDN-Assets.md
Last active October 28, 2023 12:15
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
@dalegaspi
dalegaspi / brew_symlink_error_sierra.md
Last active January 4, 2024 22:32
Homebrew Symlink errors in Mac OSX High Sierra
@Artistan
Artistan / EloquentUser.php
Last active August 21, 2024 14:40
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)
@jimrubenstein
jimrubenstein / _git-objects-restore.php
Last active September 15, 2023 19:04
Restore files from .git/objects
#!/usr/local/bin/php
<?php
define('DIR', 'tree');
define('FILE', 'blob');
function main() {
$root_object = 'f3c8ec92f83e2a87c1d00a5681598126e23ab356';
restore_object($root_object, 'restored');
}
@mrgoos
mrgoos / app.module.ts
Last active September 17, 2024 21:54
Intercepting http request/respons in Angular 2. Works from version 2.3.0.
...
...
providers: [
{ provide: Http, useClass: ExtendedHttpService }
]
...
...
@jherax
jherax / arrayFilterFactory.1.ts
Last active September 23, 2025 09:55
Filters an array of objects with multiple match-criteria.
type FilterOperator = 'AND' | 'OR';
type FiltersBy<T> = {
[K in keyof T]?: (value: T[K]) => boolean;
};
/**
* Factory function that creates a specialized function to filter
* arrays, by validating all filters (AND operator),
* or validating just one of the filters (OR operator).
* @param operator Method to validate all filters: AND, OR
@WengerK
WengerK / README.md
Last active June 20, 2019 15:21
Drupal 8  —  Differences between Configuration API & State API

Article Ressources - Drupal 8  —  Differences between Configuration API & State API

This is the Gist repository for my article Drupal 8  —  Differences between Configuration API & State API.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.