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 |
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
#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
# 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
# Create CA | |
openssl genrsa -des3 -out ./ssl/rootCA.key -passout file:./ssl/pass 2048 | |
# Check: openssl rsa -in ssl/rootCA.key -check | |
openssl req -x509 -new -nodes -key ./ssl/rootCA.key -sha256 -days 1024 -out ./ssl/rootCA.pem -passin file:./ssl/pass -subj "/C=PK/ST=Balochistan/L=Quetta/O=Hajiabad/CN=ca.ghazan.work" | |
# Check: openssl x509 -in ./ssl/rootCA.pem -text | |
# Create self signed cert |
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
# Basic Checks | |
AT+COPS? // Show network operator | |
AT+COPN // All network operators | |
# SMS | |
AT+CMFG=1 // Enable txt mode SMS | |
AT+CMGS="+NUMBER" // Start SMS to this number, end in 0x1a (no newline) | |
AT+CMGR=1 // Receive and read SMS |
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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<servicing></servicing> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<SetupUILanguage> | |
<UILanguage>en-US</UILanguage> | |
</SetupUILanguage> | |
<InputLocale>en-US</InputLocale> | |
<UILanguage>en-US</UILanguage> |
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
; forward zonefile for test.com | |
$ORIGIN test.com. | |
$TTL 1h | |
test.com. IN SOA ns.test.com. username.test.com. ( 2007120710 1d 2h 4w 1h ) | |
test.com. IN NS ns | |
test.com. IN A 192.168.2.1 | |
ns IN A 192.168.2.1 | |
win IN A 192.168.2.2 | |
vcenter IN A 192.168.2.10 |
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<targets/AT91SAM7s512.h> | |
int main(void) | |
{ | |
PIOA_OER |= PIOA_OER_P18_MASK ; | |
while (1) { | |
for (int x=0;x<0x00100000;x++) { | |
PIOA_SODR |= PIOA_SODR_P18_MASK ; | |
} |
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 <targets/AT91SAM7.h> | |
.global main | |
main: | |
# Output enable | |
ldr r0, =(PIOA_BASE + PIOA_OER_OFFSET) | |
ldr r1, =PIOA_OER_P18_MASK | |
str r1, [r0] | |
loopreset: |
NewerOlder