Skip to content

Instantly share code, notes, and snippets.

View ExtremeGTX's full-sized avatar
😀

Mohamed ElShahawi ExtremeGTX

😀
  • Germany
View GitHub Profile
@ExtremeGTX
ExtremeGTX / repo-rinse.sh
Created April 16, 2020 17:09 — forked from nicktoumpelis/repo-rinse.sh
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
ExtremeGTX / routing.md
Last active March 28, 2020 23:38
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

#!/bin/sh

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

Set Max CPU freq to 1GHz

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

arm_freq=1000

Check CPU Speed current, minimum, maximum:

@ExtremeGTX
ExtremeGTX / Ubuntu_AP.md
Last active September 13, 2024 22:26
Setup Ubuntu server as Access point

Introduction

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

Overview:

The main steps can be listed as following:

  1. Install required packages
  2. Setup hostapd
  3. Setup DNSmasq
  4. Configure AP IP Address
@ExtremeGTX
ExtremeGTX / zephyr_advUseCases.md
Created November 7, 2019 11:27
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
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");
return;
}
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS", "XMI_USE_TRANSACTION", 0);
@ExtremeGTX
ExtremeGTX / esp32_gpio_bothEdge_test.c
Last active October 23, 2019 14:25
This is for Zephyr EDGE_BOTH interrupt test
/*
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
ExtremeGTX / esp32_gpio_interrupt_example.c
Created October 15, 2019 17:23
This code for bug reporting only
/* 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
ExtremeGTX / pcomm.py
Created March 22, 2019 11:21
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):
p.stdout.close()
@ExtremeGTX
ExtremeGTX / jiraAPIs_tips.md
Last active February 27, 2019 13:56
Some tips about interacting with Jira APIs (Python)

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

https://myjira.local/rest/api/2/field

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