This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simplest server socket example | |
# | |
import socket | |
s = socket.socket() | |
s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) | |
s.bind(('127.0.0.1',8080)) | |
s.listen(1) | |
conn,addr = s.accept() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
// task functions | |
void taskOne (void) { puts("Thread 1\n"); } | |
void taskTwo (void) { puts("Thread 2\n"); } | |
void taskThree (void) { puts("Thread 3\n"); } | |
// Function array of tasks | |
void *funcArray[] = { | |
&taskOne, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to increase the size of an LVM based disk | |
# Step1: Increase underlying disk size (qemu, vmware etc) | |
# Step2: | |
cfdisk /dev/nvme0n1p3 | |
pvresize /dev/nvme0n1p3 | |
lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Microchip SAM-BA is only released for x86_64 architecture and will not run on arm64 | |
# These steps allow it to be run under Ubuntu arm64 using qemu-user successfully | |
- Install Ubuntu (24.04.01) | |
- sudo apt install: | |
qemu-user | |
qemu-user-static | |
gcc-aarch64-linux-gnu | |
binutils-aarch64-linux-gnu |
OlderNewer