Skip to content

Instantly share code, notes, and snippets.

View greenido's full-sized avatar
🏃‍♂️
Running and building

Ido Green greenido

🏃‍♂️
Running and building
View GitHub Profile
const http = require('http');
const url = require('url');
const server = http.createServer((req, res) => {
const parsedUrl = url.parse(req.url, true);
// Set CORS headers
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
@greenido
greenido / espresso-labs-1-pager-v4.md
Last active July 22, 2025 03:54
Espresso Labs: AI-First IT & Cybersecurity for SMBs

Espresso Labs: AI-First IT & Cybersecurity for SMBs

Too many tools? Too little time?

Small and mid-sized businesses can’t afford a full IT team or juggle dozens of tools. Espresso Labs offers the first autonomous IT & cybersecurity platform, built for businesses like yours. We deliver enterprise-grade protection and productivity—without tool sprawl or extra headcount.


☕ What We Deliver

🎯 GOAL Drive traffic and conversions (sales) for custom 3D-printed travel bag tags via Facebook & Google Ads with a small, testable budget.

✅ STEP 1: Prepare Your Website Before running ads:

Ensure fast loading speed and mobile responsiveness.

Use clear Call to Action (CTA) like “Create Your Tag” or “Customize Yours Now”.

@greenido
greenido / csv-2-json.js
Created July 9, 2025 16:36
CSV JSON Extractor tool that will help you extract JSON data from CSV columns
import React, { useState } from 'react';
import { Upload, Download, FileText, AlertCircle } from 'lucide-react';
import Papa from 'papaparse';
const JSONExtractor = () => {
const [csvData, setCsvData] = useState([]);
const [headers, setHeaders] = useState([]);
const [selectedColumns, setSelectedColumns] = useState([]);
const [extractedJSON, setExtractedJSON] = useState([]);
const [error, setError] = useState('');
@greenido
greenido / posgres-deep-delete.sh
Created May 28, 2025 21:36
This script finds and removes all PostgreSQL Docker data locations
#!/bin/bash
# PostgreSQL Docker Data Cleanup Script
# This script finds and removes all PostgreSQL Docker data locations
set -e # Exit on any error
echo "=== PostgreSQL Docker Data Cleanup ==="
echo "Warning: This will permanently delete all PostgreSQL data!"
echo "Press Ctrl+C within 10 seconds to cancel..."
@greenido
greenido / ShortWindowsPatchManagement.ps1
Created April 29, 2025 01:04
A Minimal Windows Patch Management Script - Gathers essential Windows Update info
# Minimal Windows Patch Management Script
# Gathers essential Windows Update info
# Output setup
$OutputDir = "$env:USERPROFILE\Desktop\PatchReport"
if (!(Test-Path $OutputDir)) { New-Item -Path $OutputDir -ItemType Directory -Force | Out-Null }
$outputFile = "$OutputDir\PatchReport-$(Get-Date -Format 'yyyyMMdd-HHmmss').txt"
# Write helper
function Write-OutputFile {
@greenido
greenido / WindowsPatchManagement.ps1
Created April 29, 2025 01:03
Windows Patch Management Information Script # Refined for improved structure, efficiency, and consistency
#########################################################
# Windows Patch Management Information Script
# Refined for improved structure, efficiency, and consistency
#########################################################
# Output setup
$OutputDir = "$env:USERPROFILE\Desktop\PatchManagementReport"
if (-not (Test-Path -Path $OutputDir)) {
New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null
}
@greenido
greenido / BitDefender Alert Test.ps1
Created March 28, 2025 18:14
BitDefender Alert Test Setup and Execution Script - Install NodeJS (if we don't have it) and fetch testing script and run it
# BitDefender Alert Test Setup and Execution Script
param(
[string]$GistUrl = "https://gist.githubusercontent.com/greenido/044823b9e1ab3c409fe4d3b04dad8292/raw/638b7199564efc59062b1d314f4aec567863d748/test-bitDefender.js",
[string]$ScriptName = "bitdefender_alert_test.js"
)
# Function to check if Node.js is installed
function Test-NodeJSInstalled {
try {
$nodeVersion = node --version
@greenido
greenido / test-bitDefender.js
Created March 28, 2025 17:51
Testing BitDefender Alerts/Events
const fs = require('fs');
const path = require('path');
const winston = require('winston');
class BitDefenderAlertSimulator {
constructor(logFile = 'bitdefender_test_alerts.log') {
// Configure logging using Winston
this.logger = winston.createLogger({
level: 'info',
format: winston.format.combine(
@greenido
greenido / EspressoLabs: Real-Time Chat Application.md
Last active April 7, 2025 20:59
EspressoLabs Home Assignment: Real-Time Chat Application

EspressoLabs Home Assignment: A ReactJS Real-Time Chat Application

Objective

Build a simple real-time chat application that allows multiple users to join and interact in a chat room. This assignment is designed to evaluate your ability to work with real-time communication, authentication, and scalable architecture. Please use ReactJS.

Time Limit

90 minutes

Requirements