Skip to content

Instantly share code, notes, and snippets.

View dawidd6's full-sized avatar
:shipit:

Dawid Dziurla dawidd6

:shipit:
  • Poland
  • 05:14 (UTC +02:00)
View GitHub Profile
@frfahim
frfahim / network-namespace.md
Last active March 5, 2024 22:04
Understand network space, container networking basic understanding

Network Namespace

Linux kernal (v5.6) has 8 types of namespaces. Network namespace is one of the feature of linux kernal. Most container technologies use this feature to create isolated network stack in the operating system. We can create virtualized network stack with its interfaces, IP range, routing table etc. We can run application in different network stacks.

VETH devices are virtual ethernet devices. They can act as tunnels between network namespaces to create a bridge to a physical network device in another namespace, but can also be used as standalone network devices. The virtual ethernet device will act as a tunnel between the network namespaces that we will create.

We will go thorugh linux network namespace. We want to learn how two network namespace communicate with each other. Also we will see how a network namespace will communicate with outer world.

Our objectives:

@sampointer
sampointer / gist:b506369b926ad395123aa7f18275de92
Last active February 28, 2024 18:31
NixOS Packages From Unstable alongside Stable (Google Chrome)

If you'd like to keep up-to-date with Chrome from unstable but otherwise want to run a stable NixOS release you can do the following:

  • Create a file /etc/nixos/unstable.nix:
{ config, pkgs, ...}:
let
  baseconfig = { allowUnfree = true; };
  unstable = import <nixos-unstable> { config = baseconfig; };
in {
@eirikb
eirikb / qemu-arch-linux-raspi2.sh
Last active March 29, 2024 18:12
Arch Linux in QEMU for Raspberry Pi 2
#!/usr/bin/env bash
echo
echo "Arch Linux in QEMU with love from eirikb"
echo
set -x
TARGET=ArchLinuxARM-rpi-armv7-latest.tar.gz
wget "http://os.archlinuxarm.org/os/$TARGET"
@peltho
peltho / svelte.md
Last active May 16, 2024 03:44
Svelte cheatsheet
@jamesmcm
jamesmcm / networkns.sh
Created January 26, 2020 13:35
networkns.sh
# Running specific applications through a VPN with network namespaces
# Initial state
curl ifconfig.co/city
sudo ip link list
sudo ip netns list
# Disable Uncomplicated Firewall (Ubuntu)
sudo ufw disable
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active April 23, 2024 17:11 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@plembo
plembo / RPIwithQEMU.md
Last active May 16, 2024 08:38
Emulating a Raspberry Pi with QEMU

Emulating a Raspberry Pi with QEMU

Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).

The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.

A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.

@tjvr
tjvr / crypttab
Last active March 13, 2024 17:06
Hibernate on Ubuntu 18.04 with LVM full-disk encryption
sda5_crypt UUID=c66880c1-c2f1-40fc-9580-f25d493876ef none luks,discard
@android10
android10 / install_ubuntu_fonts_rehat.md
Last active November 24, 2022 23:05
Install Ubuntu Fonts on RedHat/Fedora Linux

1 - Open the terminal and type below given command

cd /root
yum install wget       (you can skip this step if wget is already installed)
wget https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip (check the newest version)

2 - Check if the directory /usr/share/fonts exist. If the fonts directory do not exist,you can create yourself.

@agentzh
agentzh / network-namespace-demo.sh
Last active March 5, 2024 22:05
Create 2 network namespaces and bridge them and the default namespace together so that they can directly talk to each other via static IP addresses; also enable Internet access in all the namespaces via NAT.
#!/usr/bin/env bash
set -x
main_if=ens33
ping_count=1
echo 1 > /proc/sys/net/ipv4/ip_forward || exit 1
ip netns del ns1 > /dev/null 2>&1