Skip to content

Instantly share code, notes, and snippets.

View justaCasualCoder's full-sized avatar
🎯
Focusing

justaCasualCoder

🎯
Focusing
  • In a galaxy far, far away.
  • 09:03 (UTC -04:00)
View GitHub Profile
@GithubUser5462
GithubUser5462 / ReadMe.md
Last active October 10, 2024 21:11
ERROR: unable to configure virtual network port: could not open TUN/TAP device: No such file or directory

ERROR: unable to configure virtual network port: could not open TUN/TAP device: No such file or directory

The error message you are seeing is related to the TUN/TAP device. This device is used to create virtual network interfaces. The error message suggests that the device is not available or not configured correctly.

You can try the following steps to resolve the issue:

1. Kernel module

  • Check if the TUN/TAP device is loaded by running the command lsmod | grep tun
  • If it is not loaded, you can load it by running sudo modprobe tun
@sadiqsalau
sadiqsalau / mtk-partitions.txt
Last active April 29, 2025 08:19
MTK Partitions
MTK platform partition meaning
#Pre-loader
Pre-loader image
Handles all the download and secure boot procedure
#DSP_BL
DSP Boot Loader
#MBR、EBR1、EBR2
Ext4 file system partition index table
@nstarke
nstarke / resize-ghidra-gui.md
Last active April 19, 2025 04:57
Resize Ghidra GUI for High DPI screens

Resize Ghidra for High DPI screens

If you run Ghidra on a high DPI screen, you will probably find the GUI to be scaled down so small to be almost of no use.

There is a setting that you can adjust to scale the Ghidra GUI:

in $GHIDRA_ROOT/support is a file named launch.properties. In this launch.properties file is the following configuration key:

VMARGS_LINUX=-Dsun.java2d.uiScale=1
@MichaelSimons
MichaelSimons / RetrievingDockerImageSizes.md
Last active April 20, 2025 20:43
Retrieving Docker Image Sizes

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size

@pm-hwks
pm-hwks / netcat.sh
Created August 21, 2019 07:03
[Netcat network test] Netcat commands to test bandwidth between 2 linux servers #netcat #perf-test #linux #network
## Netcat server command
nc -l <unused port # > /dev/null
eg:
nc -l 1122 > /dev/null
## Netcat Client command
dd if=/dev/zero bs=9100004096 count=1 | nc <netcat server> <netcat port>
eg:
dd if=/dev/zero bs=9100004096 count=1 | nc 10.0.1.251 1122
@azureru
azureru / extract android kernel.md
Last active March 20, 2025 03:19
How to Extract Android Kernel And Modify The Boot Ramdisk (Android 4.4) on Allwinner based Processor

Extracting Existing Kernel + Ramfs

Enter the machine using adb shell

Run cat /proc/partitions

  #  Path                     Purpose        Size
  0 /dev/block/mmcblk0                       7761920
  1 /dev/block/mmcblk0p1      data           6085631
@bnerd
bnerd / ffmpeg
Created November 13, 2012 23:18
Encode RTMP input stream into multiple outputs with ffmpeg
ffmpeg -re -i rtmp://localhost/live/input_stream -acodec libfaac -ab 128k -vcodec libx264 -s 640x360 -b:v 500k -preset medium -vprofile baseline -r 25 -f flv rtmp://localhost/live/medium_500k -acodec libfaac -ab 128k -vcodec libx264 -s 480x272 -b:v 300k -preset medium -vprofile baseline -r 25 -f flv rtmp://localhost/live/medium_300k -acodec libfaac -ab 128k -c:v libx264 -s 320x200 -b:v 150k -preset:v fast -profile:v baseline -level 1.2 -r 25 -f flv rtmp://localhost/live/medium_150k -acodec libfaac -vn -ab 48k -f flv rtmp://localhost/live/audio_only