Skip to content

Instantly share code, notes, and snippets.


Mohamed ElShahawi ExtremeGTX

  • Germany
View GitHub Profile
ExtremeGTX /
Created Apr 16, 2020 — forked from nicktoumpelis/
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
ExtremeGTX /
Last active Mar 28, 2020
This script is to configure an intermediate machine to allow remote access to a development board

This script is to configure an intermediate machine to allow remote access to a development board


# Network Topology
# [Developer Machine]   <-->  [Remote Machine(Linux)]  <-->  [Development Board]
#    Machine (A)                   Machine (B)                  Machine (C)
#        <-->    eth0:

Set Max CPU freq to 1GHz

add to config.txt arm_freq value sudo vi /boot/firmware/config.txt


Check CPU Speed current, minimum, maximum:

ExtremeGTX /
Last active Sep 8, 2022
Setup Ubuntu server as Access point


This tutorial for setting up Ubuntu Server (RPi 3B) as Wifi access point


The main steps can be listed as following:

  1. Install required packages
  2. Setup hostapd
  3. Setup DNSmasq
  4. Configure AP IP Address
ExtremeGTX /
Created Nov 7, 2019
The list begins because of Cortex-A53 PR

Use cases of Zephyr on High-End SoCs:

  • Zephyr as bootloader (UEFI Boot, os loading)
  • Running zephyr on one A53 core and Linux on the other
  • Use a hypervisor that can schedule Zephyr for realtime tasks and Linux for HMI tasks
View set_get_value.cs
using Microsoft.Win32;
private void button1_Click(object sender, EventArgs e)
int? XMI_Transactions = (int?)Registry.GetValue(@"HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS", "XMI_USE_TRANSACTION", null);
if (XMI_Transactions == null)
MessageBox.Show("EA is not installed");
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS", "XMI_USE_TRANSACTION", 0);
ExtremeGTX / esp32_gpio_bothEdge_test.c
Last active Oct 23, 2019
This is for Zephyr EDGE_BOTH interrupt test
View esp32_gpio_bothEdge_test.c
This test use pins 16,17 Bank_0 on Espressif DevkitC V4
Just Connect both pins, no other external circuitry should be required
#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>
#include <sys/util.h>
#include <sys/printk.h>
ExtremeGTX / esp32_gpio_interrupt_example.c
Created Oct 15, 2019
This code for bug reporting only
View esp32_gpio_interrupt_example.c
/* Based on esp-idf GPIO Example */
/* GPIO Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
ExtremeGTX /
Created Mar 22, 2019
Python process communication
def ReadSVNLog(BaseRev,rev,variant):
FoundRev = ""
p = subprocess.Popen("svn log --stop-on-copy -r HEAD:{} --search r{} https://mysvn/{}".format(BaseRev,rev,variant) , stdout=subprocess.PIPE, shell=True)
for stdout_line in p.stdout: #Loop on lines printed to stdout
tmp = re.findall(r'r\d+\s|',str(stdout_line.decode('utf-8')))[0] #This is to match rXXXXX in commit msg header
if len(tmp) > 1: #at least rXXXXX
FoundRev = tmp.replace('r','').rstrip()
print("Debug {}".format(FoundRev))
if rev in str(stdout_line):
ExtremeGTX /
Last active Feb 27, 2019
Some tips about interacting with Jira APIs (Python)

List all available fields and their info like id, description, etc.


Make a transition with mandatory field:

jira.transition_issue(issue, '81',fields={'customfield_XXXXX': "SomeStringValue"}) #Move to State 81 with mandatory field customfield_XXXXX

update multiple fields