Skip to content

Instantly share code, notes, and snippets.

View aaomidi's full-sized avatar

Amir Omidi aaomidi

  • US
View GitHub Profile
@aaomidi
aaomidi / nat_rules
Last active September 2, 2018 15:39
Script to run the VPN
nat on utun2 from 192.168.2.0/24 to any -> (utun2)
@aaomidi
aaomidi / Dockerfile
Last active January 18, 2022 16:01
firewalld blocking DNS when running in docker-compose & sysbox runtime
FROM centos:8
ENTRYPOINT [ "/sbin/init", "--log-level=err" ]
RUN yum install -y systemd openssh-server openssh-server bind-utils nc
RUN echo "root:1" | chpasswd
RUN echo "PermitRootLogin yes" > /etc/ssh/sshd_config
RUN yum install -y firewalld
Item #: SCP-XXXX
Object Class: Euclid
Special Containment Procedures: The process of going from draft to published Request for Comments (RFC) at the Internet Engineering Task Force (IETF) is to be closely monitored and documented by Foundation agents embedded within the IETF. These agents are to observe and record any deviations from standard protocol, as well as any anomalous activity that may occur during the process.
Any anomalous activity discovered during the process is to be reported immediately to the IETF Security Area Directors and the Foundation's Director of Information Security. The anomalous activity is to be contained and neutralized as quickly and efficiently as possible, with minimal disruption to the normal operation of the IETF.
Description: SCP-XXXX is the process of going from draft to published RFC at the IETF. This process involves multiple steps, including:
package main
import (
"bytes"
"flag"
"fmt"
"go/ast"
"go/parser"
"go/printer"
"go/token"
@aaomidi
aaomidi / ghc.sh
Created November 20, 2023 01:44
Organize your github clones automatically
#!/usr/bin/env bash
# Extract the organization and repo name from the argument
ORG=$(echo "$1" | cut -d '/' -f 1)
REPO=$(echo "$1" | cut -d '/' -f 2)
# Define the base directory
BASE_DIR="$HOME/Projects"
# Create the directory structure
@aaomidi
aaomidi / options.go
Last active January 24, 2025 15:54
Pulumi doesn't have a good way of combining resource and invoke options into a single container that we can pass down to functions. This solves that problem. Keywords: pulumi.ResourceOrInvokeOption
/*
Copyright 2025 SPIRL
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DE