This file contains hidden or 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
| #!/bin/bash | |
| # Get the drive letter and Linux path arguments | |
| drive_letter="$1" | |
| linux_path="$2" | |
| # Check if arguments are provided | |
| if [ -z "$drive_letter" ] || [ -z "$linux_path" ] | |
| then | |
| echo "Error: Please provide both drive letter and Linux file path as arguments." |
This file contains hidden or 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
| Compile with debug information: | |
| gcc -g -o main main.c | |
| Separate the debug information: | |
| objcopy --only-keep-debug main main.debug | |
| or | |
| cp main main.debug | |
| strip --only-keep-debug main.debug |
This file contains hidden or 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
| sed 's/\(<[^/]*[^>]*>\)\/\//\1>\</g' your_xml_file.xml |
This file contains hidden or 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
| #!/bin/bash | |
| # Get the current time | |
| current_time=$(date +"%Y-%m-%d %H:%M:%S") | |
| # Get the address range from the user | |
| start_address=$1 | |
| end_address=$2 | |
| # Check if the address range is valid |
This file contains hidden or 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> | |
| #include <stdlib.h> | |
| #include <pthread.h> | |
| #include <inttypes.h> | |
| #include <semaphore.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <sys/stat.h> | |
| /************************************ |
This file contains hidden or 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
| 1. Get the static Ip of beaglebone after connecting with pc and name space server to BBB | |
| vi /etc/resolv.conf | |
| nameserver 8.8.8.8 | |
| nameserver 8.8.4.4 | |
| get the BBB interface ip from Ubuntu | |
| run command | |
| sudo route add default gw 192.168.7.1 usb0 | |
| sudo route add default gw 192.168.6.1 usb1 | |
| 2. On Ubuntu check for the interfaces | |
| WAN: wlp3s0 |
This file contains hidden or 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
| /* USER CODE BEGIN Header */ | |
| /** | |
| ****************************************************************************** | |
| * @file : main.c | |
| * @brief : Main program body | |
| ****************************************************************************** | |
| * @attention | |
| * | |
| * <h2><center>© Copyright (c) 2019 STMicroelectronics. | |
| * All rights reserved.</center></h2> |
This file contains hidden or 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
| /* USER CODE BEGIN Header */ | |
| /** | |
| ****************************************************************************** | |
| * @file : main.c | |
| * @brief : Main program body | |
| ****************************************************************************** | |
| * @attention | |
| * | |
| * <h2><center>© Copyright (c) 2019 STMicroelectronics. | |
| * All rights reserved.</center></h2> |
This file contains hidden or 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> | |
| #include <stdint.h> | |
| char hex_string[2]; | |
| int main(void) | |
| { | |
| uint8_t check_sum = 242; | |
| sprintf(hex_string, "%02X", check_sum); | |
| for(int i=0; i<4;i++) |
This file contains hidden or 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> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| typedef struct Intel_Hex{ | |
| uint8_t length; | |
| uint32_t addr; | |
| uint8_t record_type; |
NewerOlder