Skip to content

Instantly share code, notes, and snippets.

WRAP - Issue Writing for AI Coding Agents

Transform a task/idea into a well-structured issue optimized for AI coding agents.

WRAP: Write effective issues | Refine instructions | Atomic tasks | Pair with agent

Input

$ARGUMENTS - Task description, Jira ticket ID, or rough idea to transform

@zfael
zfael / compare-release.sh
Created December 11, 2025 15:07
Quick script to compare a given branch (default main) towards the last tag in order to identify the new changes
#!/bin/bash
# compare-release.sh - Compare git tags with branches
# Usage:
# ./compare-release.sh # Compare last tag with main
# ./compare-release.sh --branch develop # Compare with specific branch
# ./compare-release.sh --detailed # Show detailed diff
# ./compare-release.sh --commits-only # Show only commits
set -e
@zfael
zfael / mr-key.txt
Last active April 4, 2025 20:09
MR Key
999911110
@zfael
zfael / nodejs.checksum.js
Created June 20, 2017 13:57
NODE.JS - How to generate file's Checksum (CRYPTO)
var fs = require('fs');
var crypto = require('crypto');
fs.readFile('file.pdf', function(err, data) {
var checksum = generateChecksum(data);
console.log(checksum);
});
function generateChecksum(str, algorithm, encoding) {
return crypto
@zfael
zfael / load-test.ts
Last active October 7, 2024 19:24
Node script for load testing!
/**
* Usage
* - npm install loadtest
* - npx ts-node load-test.ts
*/
import loadtest from 'loadtest';
const method = 'GET';
@zfael
zfael / sync-gitignore
Created December 18, 2018 19:09
Resync git repo with new gitignore file
# rm all files
git rm -r --cached .
# add all files as per new .gitignore
git add .
# now, commit for new .gitignore to apply
git commit -m ".gitignore is now working"
Ref> https://stackoverflow.com/questions/7075923/resync-git-repo-with-new-gitignore-file
@zfael
zfael / nodejs.verifysignedfile.js
Last active October 11, 2021 08:52
Node.Js - CRYPTO How to verify a signed file
//how to execute: node verify.js <path file that you want to verify> <certificate path> <hash generate by sign.js>
//output: true if files are equal, false otherwise.
var crypto = require('crypto');
var fs = require('fs');
var args = process.argv.slice(2);
var fileName = args[0];
var certPath = args[1];
var sig = args[2];
@zfael
zfael / nodejs.signfile.js
Last active October 5, 2021 16:21
Node.JS - CRYPTO How to sign a file
//how to execute: node sign.js <path file> <path private key>
//output: signature of file
var crypto = require('crypto');
var fs = require('fs');
var args = process.argv.slice(2);
var fileName = args[0];
var keyPath = args[1];
//openssl genrsa -out key.pem 1024
@zfael
zfael / refresh-token-approach.ts
Last active August 13, 2020 18:59
Node.js - refresh token approach with 2 way encryption + JWT
import crypto from 'crypto';
import jwt from 'jsonwebtoken';
import { v4 as uuid } from 'uuid';
const secret = 'your-access-token-secret';
console.log('access token secret\n', secret);
const refreshTokenSecret = 'your-refresh-token-secret';
console.log('refresh token secret\n', refreshTokenSecret);
@zfael
zfael / killport-shortcut.sh
Last active January 7, 2020 18:46
shortcut to kill a specific port
# Usage
# 1 - add below snippet on your bashrc/zshrc
# 2 - call it by "killport 4000"
# 3 - profit
killport() {
port=$(lsof -n -i4TCP:$1 | grep LISTEN | awk '{ print $2 }')
kill -9 $port
}