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
@greenido
greenido / vnc-windows.ps
Created January 6, 2025 22:55
Install VNC on windows11
# Requires PowerShell to be run as Administrator
#Requires -RunAsAdministrator
# Function to check if TightVNC is installed
function Test-TightVNCInstalled {
$installed = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object { $_.DisplayName -like "*TightVNC*" }
return $null -ne $installed
}
@greenido
greenido / vnc-macOS.sh
Created January 6, 2025 22:53
Uses macOS's built-in Screen Sharing instead of installing a VNC server
#!/bin/bash
# Check if running on macOS
if [ "$(uname)" != "Darwin" ]; then
echo "This script is for macOS only"
exit 1
fi
# Check if running as root
if [ "$EUID" -eq 0 ]; then
@greenido
greenido / full-stack-engineer-assignment-2.md
Last active January 12, 2025 23:20
A Home Assignment for full-stack Developer (ReactJS / TypeScript)

Home Assignment for TypeScript Developers

Objective:

  • Build a simple web application that allows an admin to manage a network of agents.
  • The admin should be able to add, update, view, and delete agents in the network.

Requirements

@greenido
greenido / Docker_Cheat_Sheet.md
Created November 22, 2024 22:19
Docker Commands Cheat Sheet - Most Useful Commands

Docker Commands Cheat Sheet - Most Useful Commands 🌻

Container Management

  1. Run a container
docker run [OPTIONS] IMAGE [COMMAND]
# Example: Run nginx in detached mode with port mapping
docker run -d -p 80:80 nginx
@greenido
greenido / Startup One-Pager Template.md
Created November 22, 2024 16:03
Startup One-Pager Template

[Company Name]

An Overview

  • answer WHY you and WHY now.

Problem

  • Current market challenge or pain point
  • Scale and impact of the problem
  • Existing inadequate solutions (competitors and hidden ones)
@greenido
greenido / PostgreSQL-aws-linux.md
Created November 13, 2024 02:46
PostgreSQL Installation Guide for Amazon Linux 2023

PostgreSQL Installation Guide for Amazon Linux 2023

Prerequisites

  • An Amazon Linux 2023 instance
  • Sudo privileges
  • Active internet connection

Installation Steps

1. Update System Packages

@greenido
greenido / chrome_ext_local_agent.js
Created November 7, 2024 22:43
Chrome Extension to Local Agent Communication
// manifest.json
{
"name": "Local Agent Connector",
"version": "1.0",
"manifest_version": 3,
"permissions": [
"nativeMessaging",
"tabs"
],
"background": {
@greenido
greenido / docker-aws-deplyment.md
Created November 6, 2024 22:09
Setting Up Test Environment for Docker Images on AWS

Setting Up Test Environment for Docker Images on AWS

1. Infrastructure Setup using AWS CDK or CloudFormation

# test-environment.yaml
AWSTemplateFormatVersion: '2010-09-01'
Description: 'Test environment for Docker applications'

Parameters:
@greenido
greenido / drive_by_downloads.js
Created November 4, 2024 23:31
Chrome Extension example: Drive-by downloads
// DriveByProtector.js
class DriveByProtector {
constructor() {
this.suspiciousPatterns = {
fileTypes: /\.(exe|msi|dmg|pkg|deb|bat|cmd|sh|ps1|vbs|jar|dll|scr)$/i,
mimeTypes: [
'application/x-msdownload',
'application/x-msdos-program',
'application/x-executable',
'application/x-dosexec',
@greenido
greenido / suspicious_redirects.js
Created November 4, 2024 23:30
Chrome extension example: suspicious redirects, listen to URL event and block ones who exhibit rapid switching and suspicious URL or DNS patterns
// manifest.json
{
"manifest_version": 3,
"name": "Redirect Detective",
"version": "1.0",
"description": "Detects and analyzes potentially malicious redirects",
"permissions": [
"webNavigation",
"webRequest",
"storage",