Skip to content

Instantly share code, notes, and snippets.

View soundstep's full-sized avatar
💭
There is a difference between a peasant and a knight

Romuald Quantin soundstep

💭
There is a difference between a peasant and a knight
View GitHub Profile
@soundstep
soundstep / status.js
Created March 3, 2023 11:50
Goreplay
const gor = require('goreplay_middleware');
const fs = require('fs');
// `init` will initialize STDIN listener
gor.init();
// Example of very basic way to compare if replayed traffic have no errors
gor.on('request', function (req) {
gor.on('response', req.ID, function (resp) {
gor.on('replay', req.ID, function (repl) {
if (gor.httpStatus(resp.http) != gor.httpStatus(repl.http)) {
import sodium from 'https://cdn.skypack.dev/libsodium-wrappers@0.7.10?dts';
console.log(sodium);
import sodium from 'https://esm.sh/libsodium-wrappers@0.7.10?deno-std=0.160.0';
console.log(sodium);
@soundstep
soundstep / output
Created August 11, 2022 10:08
Deno semver
semver.inc("1.0.0", "patch") >>> 1.0.1
semver.inc("1.0.0", "minor") >>> 1.1.0
semver.inc("1.0.0", "major") >>> 2.0.0
--- prepatch ---
semver.inc("1.0.0", "prepatch") >>> 1.0.1-0
semver.inc("1.0.0-itvx", "prepatch", "itvx") > 1.0.1-itvx.0
semver.inc("1.0.0-itvx.0", "prepatch", "itvx") > 1.0.1-itvx.0
--- preminor ---
semver.inc("1.0.0", "preminor") >>> 1.1.0-0
semver.inc("1.0.0-itvx", "preminor", "itvx") > 1.1.0-itvx.0
openapi: 3.0.3
info:
title: Pact bi-directional
version: 1.0.0
contact: {}
servers:
- url: http://example.com
paths:
/discovery:
post:
openapi: 3.0.3
info:
title: ITV - Pact bi-directional
version: 1.0.0
contact: {}
servers:
- url: http://example.com
paths:
/discovery:
get:
{
"info": {
"_postman_id": "41598fbc-9770-47d3-930e-6d0a491e8e00",
"name": "Pact bi-directional",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "659145"
},
"item": [
{
"name": "POST discovery PRD",
This file has been truncated, but you can view the full file.
{
"0 debug pnpm:scope": {
"selected": 20,
"total": 20,
"workspacePrefix": "/Users/romuquan/Documents/devserver/workspace/fe-core"
},
"1 debug pnpm:package-manifest": {
"initial": {
"name": "performance",
"version": "1.0.0",
### Keybase proof
I hereby claim:
* I am soundstep on github.
* I am romualdquantin (https://keybase.io/romualdquantin) on keybase.
* I have a public key ASAu7xS8jEhHgfZX9LNLoWwOP2nUlnb9Y8BQT1aKVhLtxAo
To claim this, I am signing this object:
@soundstep
soundstep / hades-files
Created April 2, 2020 11:55
Tampermonkey script to retrieve hades files (js and css)
// ==UserScript==
// @name Extract Hades files
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include http*://*hades*
// @grant none
// ==/UserScript==