Skip to content

Instantly share code, notes, and snippets.

View Hiestaa's full-sized avatar

Romain Guyot de la Hardrouyere Hiestaa

View GitHub Profile
@Hiestaa
Hiestaa / README.md
Created October 29, 2026 15:09
Git Worktree Checkout

How to use

Place in ~/.config/fish/functions/gwco.fish Run gwco <branch name> for an existing branch . if no worktree exist for this branch, it'll checkout the branch in the current worktree. If one exist already, git refuses to switch to that branch. The script finds the worktree location and changes directory to that worktree.

@Hiestaa
Hiestaa / README.md
Created February 7, 2025 18:15
Firefox Customization - userChrome.css
@Hiestaa
Hiestaa / parser.js
Last active August 17, 2022 15:17
Dwell Time Test Suite - Test Chain Data Linking with Dummy Dwell Time Events
/** Data Link Configuration:
{
"dataLink": {
"details.scheduledActivity": {
"match": [
"cameras.$any.id"
],
"window": [
86400,
0
@Hiestaa
Hiestaa / parser.js
Last active July 12, 2022 14:55
Alarm Triggers Parser Test Suite
const LAG = 3 * 60 * 1000;
const GAP = 10 * 1000;
dataReceived = function () {
};
function startTime() {
return new Date(Date.now() - LAG).toISOString();
}
@Hiestaa
Hiestaa / parser.js
Last active May 2, 2025 21:51
Dummy Transaction Parser
let count = 0;
const INTERVAL = 120 * 1000;
const INTERVAL_VARIATION_RANGE = 120 * 1000;
const LAG = Math.round((1 + Math.random() * 10) * 60 * 1000);
const LIMIT = 1000;
const EMPLOYEES = [
"Mana Kujawa",
"Carissa Ledesma",
"Beverly Murrow",
"Melodi Lovick",
@Hiestaa
Hiestaa / iterm2_switch_automatic.md
Created May 5, 2020 19:20 — forked from FradSer/iterm2_switch_automatic.md
Switch iTerm2 color preset automatic base on macOS dark mode.
  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
#!/usr/bin/env python3

import asyncio
import iterm2

async def main(connection):
    async with iterm2.VariableMonitor(connection, iterm2.VariableScopes.APP, "effectiveTheme", None) as mon:
@Hiestaa
Hiestaa / overload.js
Created September 20, 2019 19:46
Overload a webserver with a large number of queries for testing purposes (don't be a dick...)
var argv = require('yargs')
.usage('Usage: $0 -n num -q url[?queryString] [-m method] [-b body]')
.demandOption(['n', 'q'])
.argv;
var axios = require('axios');
promises = []
Promise.all([...Array(parseInt(argv.n, 10))].map((data, index) => {
let p
@Hiestaa
Hiestaa / echo.js
Last active September 20, 2019 19:02
Minimalist http echo server. Replies with the method, url, query and (json) body received on any endpoint. Run with `npm install && npm start`.
var express = require("express"),
app = express();
var bodyParser = require('body-parser');
function echo(req, res, next) {
const queryStr = Object.entries(req.query).map(([key, val]) => `${key}=${val}`).join('&');
const bodyStr = req.body ? JSON.stringify(req.body) : null;
const response = req.method + ' ' + req.url + (queryStr && queryStr.length ? '?' + queryStr : '') + '\n' + (bodyStr ? bodyStr + '\n' : '');
console.log(response);
res.end(response);
#!/bin/bash
for i in "$@"
do
case $i in
-p=*|--password=*)
PASSWORD="${i#*=}"
;;
-s=*|--servername=*)
SERVERNAME="${i#*=}"
@Hiestaa
Hiestaa / keybase.md
Created June 8, 2018 15:24
keybase.md

Keybase proof

I hereby claim:

  • I am hiestaa on github.
  • I am rguyot (https://keybase.io/rguyot) on keybase.
  • I have a public key ASC0-5kzdP4c6U26wLFOIfwhtLH6aiqvkMyl9Z_gdy1LLAo

To claim this, I am signing this object: