Skip to content

Instantly share code, notes, and snippets.

View abousselmi's full-sized avatar
🐪
Seeking oasis

ab abousselmi

🐪
Seeking oasis
View GitHub Profile
@s8sg
s8sg / NetworkingFirecracker.md
Last active May 4, 2024 18:51
Networking with Firecracker

Create Bridge interface on the host and give internet access

sudo ip link add name br0 type bridge
sudo ip addr add 172.20.0.1/24 dev br0
sudo ip link set dev br0 up
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables --table nat --append POSTROUTING --out-interface enp3s0 -j MASQUERADE
sudo iptables --insert FORWARD --in-interface br0 -j ACCEPT

Create a tap device and link to the bridge

@tintoy
tintoy / ssh_jump.py
Created April 27, 2018 02:45
SSH via jump-hosts using Paramiko
#!/usr/bin/env python3
import os
import paramiko
ssh_key_filename = os.getenv('HOME') + '/.ssh/id_rsa'
jumpbox_public_addr = '168.128.52.199'
jumpbox_private_addr = '10.0.5.10'
target_addr = '10.0.5.20'
@czechnology
czechnology / bmc.py
Last active January 3, 2024 16:35
Simple tool to parse the BMC web console of a Nokia Airframe rack server and retrieve the MAC addresses of all available interfaces. Output as ASCII table or tab-separated values (for simple copying to a spreadsheet).
#!/usr/bin/env python
"""
Simple tool to parse the BMC web console of a Nokia Airframe rack server and
retrieve the MAC addresses of all available interfaces. Output as ASCII table
or tab-separated values (for simple copying to a spreadsheet).
Example usage:
./bmc.py -u admin -p admin 10.11.12.101 10.11.12.102 10.11.12.103
Tested with BMC Web UI version 1.00.0, KVM Remote Console Utility Version
@Humoud
Humoud / regex-arabic.md
Last active April 1, 2024 03:48
Detecting arabic characters with regex.

Detect all Arabic Characters:

/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/

Summary:

  Arabic (0600—06FF, 225 characters)

  Arabic Supplement (0750—077F, 48 characters)

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@huytd
huytd / android_game.java
Last active August 22, 2023 14:37
Simple game engine using Canvas for Android - using for quick prototype or simple games
package com.gamarist.momoney;
import android.os.Bundle;
import android.R.integer;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;