Skip to content

Instantly share code, notes, and snippets.

@Siedrix
Siedrix / calculate-quality.ts
Created June 15, 2025 02:58
Prompt to calculate quality
// TASK: calculate
// Run this task with:
// forge task:run quality:calculate --uuid 94a2f0b6-66e5-4674-9f3c-ab77acc8b903
import { createTask } from '@forgehive/task'
import { Schema } from '@forgehive/schema'
import { OpenAI } from 'openai'
import { Idea } from '@/models'
const description = 'Load and process an idea by UUID'
@Siedrix
Siedrix / fixture.json
Last active May 27, 2025 17:38
Summary task
{
"taskName": "openAi:summary",
"projectName": "pkms",
"fixtureUUID": "1d0e9aef-35dc-4885-be34-61c667b828f0",
"input": {
"uuid": "b7cc8b2f-937c-43cc-81fb-8e939e45a21a"
},
"boundaries": {
"findByUuid": [
{
@Siedrix
Siedrix / Mini forge
Last active April 23, 2025 00:18
Mini forge
Add the task and task with boundaries on the src/lib folder
Add the cli on the src folder
Create a tsconfig of something like
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"declaration": true,
@Siedrix
Siedrix / snippet.md
Last active September 3, 2018 16:33
Certbot wildcard subdomains
git clone https://github.com/certbot/certbot
cd certbot
git checkout v0.22.0
sudo ./certbot-auto --os-packages-only
./tools/venv.sh
source venv/bin/activate
certbot -d *.domain.com --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory certonly
@Siedrix
Siedrix / spec.md
Last active June 6, 2016 16:58
The imposible project

Objetivo del evento:

  • Aprender a hacer landing pages.

Metricas a juzgar:

  • Que tan poco viable es la idea. Mientras menos viable y mas sci-fi, mejor.
  • Hacer una landing page que venda esta idea y convenza de comprar esta idea.

Posibles ideas:

@Siedrix
Siedrix / cacheless-server.js
Created May 13, 2016 15:45
Koa cache server
const koa = require('koa')
const Router = require('koa-router')
const request = require('request-promise')
const app = koa()
const router = new Router()
router.get('/', function *(next) {
var body = yield request({
@Siedrix
Siedrix / nginx-sample
Created February 20, 2016 23:07
nginx-sample
upstream siedrixServer {
server localhost:4000;
}
server {
listen 80;
server_name siedrix.com;
root /home/ubuntu/siedrix;
@Siedrix
Siedrix / ejercicio-1.js
Created January 24, 2016 15:16
Ejercicios de la tarea 1
var inquirer = require('inquirer')
var valorAAdivinar = 6
inquirer.prompt([
{
type:'input',
name:'adivina',
message:'Elije un numero del 1 al 10'
}
], function (answers) {
@Siedrix
Siedrix / client.js
Created April 6, 2015 14:07
Tutum websocket examples
var WebSocket = require('ws');
var userPublicToken = 'apikey';
var username = 'username';
var ws = new WebSocket('wss://stream.tutum.co/v1/events?token='+ userPublicToken +'&user=' +username);
ws.on('open', function() {
console.log('Connected');
});
@Siedrix
Siedrix / backbone.widget.js
Last active August 29, 2015 14:09
Backbone.Widget
Backbone.Widget = function() {
this.initialize.apply(this, arguments);
};
_.extend(Backbone.Widget.prototype, Backbone.Events, {
initialize : function(){},
});
Backbone.Widget.extend = Backbone.View.extend;