Skip to content

Instantly share code, notes, and snippets.

View delineas's full-sized avatar
🚀
Launching...

Daniel Primo delineas

🚀
Launching...
View GitHub Profile
@yanker
yanker / C.R.A.F.T.E.D.md
Last active May 21, 2026 17:49
Marco de trabajo: C.R.A.F.T.E.D

Marco de trabajo: C.R.A.F.T.E.D

El artículo propone un marco llamado C.R.A.F.T.E.D. para estructurar los “prompts” o instrucciones que le damos a la IA, de forma que sean eficientes y reproducibles.
El acrónimo se desglosa así:

C – Context (Contexto: el “qué”)

Proporciona de antemano toda la información relevante para que la IA entienda la situación: fragmentos de código, mensajes de error, esquemas de datos, diffs de commit, requisitos, configuraciones, etc. Esto “prepara” el modelo para trabajar sobre algo concreto en lugar de empezar desde cero.

R – Role (Rol: el “quién”)

@yondemon
yondemon / exportIvooxOPML.js
Created October 6, 2020 08:06
From My Subscriptions ivoox page, run this in console to create an opml file tu export
let hrefArray = document.querySelectorAll('table.table-list tbody tr td:nth-child(5) a')
let errors = []
let contentArray = [
'<?xml version="1.0" encoding="utf-8"?>',
'<opml version="2.0">',
' <head>',
' <title>mySubscriptions.opml</title>',
' <dateCreated></dateCreated>',
' <dateModified></dateModified>',
@acasademont
acasademont / answers.md
Last active October 30, 2020 13:43
Answers to my "Supercharge your apps with ReactPHP & PHP-PM" PHP Barcelona 2019 talk

Question 182: Rasmus didn’t like async idea and he suggested to use queues and put hard works in other workers. What do you think about it?

We're talking about 2 separate things here, the ReactPHP way is not meant to be a replacement for workers to execute long-running tasks. It's meant to be a more efficient way to use your CPU and RAM resources even for very small requests by not blocking the process when doing I/O. Using a workers and queues for long-running tasks in the context of a ReactPHP app is also the recommended approach, do what Rasmus said!!

Question 179 If you want async, why not just use node? ReactPHP seems a very complicated way to achieve the same that node does

The question is, why not? IMHO it's fun and exciting to push the limits of a language. The fact that this hasn't been traditionally done by PHP doesn't mean it can't or shouldn't be tried or done. By thinking this way, Javascript would have never made it to the backends and become Node, because Javascript was never meant t

@swalkinshaw
swalkinshaw / tutorial.md
Last active January 5, 2026 14:33
Designing a GraphQL API
@mbrochh
mbrochh / some_test.js
Last active February 8, 2024 13:02
Controlling a Stripe payent popup with Cypress.io
// for this to work you need to set `"chromeWebSecurity": false` in cypress.json
describe('Make Stripe Payment', function() {
before(function() {
cy.visit('http://localhost:3000/en/stripe/checkout/')
Cypress.Cookies.preserveOnce('sessionid')
})
it('should enter credit card details and finalise payment', function() {
cy.get('[data-test="button-FormStripeCart-PayWithCreditCard"]').click()
@BrendonKoz
BrendonKoz / auto-caption-tools.md
Last active March 10, 2025 15:43
Automatic Captioning Tools
@jcberthon
jcberthon / update-docker-compose.sh
Last active December 20, 2021 02:56
Downloading and installing/updating latest Docker Compose (command line)
#!/bin/bash
# Copyright 2017-2018 Jean-Christophe Berthon
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@tomconte
tomconte / web3-solc-contract-compile-deploy.js
Created December 13, 2016 09:32
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@adamwathan
adamwathan / troubleshooting.md
Last active June 12, 2025 07:13
Troubleshooting Valet on macOS Sierra

Troubleshooting Valet on Sierra

Common Problems

Problem: I just see "It works!"

Apache is running on port 80 and interfering with Valet.

  1. Stop Apache: sudo /usr/sbin/apachectl stop
  2. Restart Valet: valet restart