Skip to content

Instantly share code, notes, and snippets.

View gitresetsoft's full-sized avatar
🎯
Locked-In-Maybe-Trying-Vibing-Perhaps

Amr gitresetsoft

🎯
Locked-In-Maybe-Trying-Vibing-Perhaps
View GitHub Profile
@gitresetsoft
gitresetsoft / gitmirror.sh
Created March 12, 2025 06:52
Mirror GitLab to GitHub via CLI
#!/bin/bash
# Script to set up repositories, projects and issues in GitLab and GitHub from CLI
# Following the flow: GitLab repo → GitHub repo → GitHub issues & project
# Prerequisites: gh, glab, git, curl, jq
# Display help text
show_help() {
echo "Usage: $0 [options]"
echo "Options:"
@gitresetsoft
gitresetsoft / net.Stream.setConnTimeout.hack.js
Created November 27, 2020 19:50 — forked from DanBUK/net.Stream.setConnTimeout.hack.js
This hack enables node.js to handle connection timeouts.
var net = require('net');
var sys = require('sys');
// START setConnTimeout hack
net.Stream.prototype._orig_connect = net.Stream.prototype.connect;
net.Stream.prototype.connect = function () {
var self = this;
if (typeof self.conn_timeout !== 'undefined' && self.conn_timeout > 0) {
self.addListener('connect', function () {
clearTimeout(self.conn_timer);