Skip to content

Instantly share code, notes, and snippets.

View ExtremeGTX's full-sized avatar
😀

Mohamed ElShahawi ExtremeGTX

😀
  • Germany
View GitHub Profile
@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

@ExtremeGTX
ExtremeGTX / Bootstrap4ThreeRowsPage.html
Created January 28, 2019 21:41
Bootstrap 4 Three Rows Page contains Tabulator, Responsive and Fit browser Window
<!doctype html>
<html lang="en">
<head>
<style>
html,body{
height: 100%;
}
.container-fluid{
background: red;
@ExtremeGTX
ExtremeGTX / proxy_tips.md
Last active January 25, 2019 15:48
Some tips about Proxy in Development Environment

Setting System Wide Proxy for python pip and nodejs npm:

set HTTP_PROXY=http://username:pAssw0rd@100.100.10.10:8080
set HTTPS_PROXY=https://username:pAssw0rd@100.100.10.10:8080

Proxy credentials can be provided in the url as the following:

format: http://username:password@proxy_address:port
example: http://username:pAssw0rd@100.100.10.10:8080

@ExtremeGTX
ExtremeGTX / ProcessExtensions.cs
Created July 26, 2018 15:46 — forked from heri16/ProcessExtensions.cs
Powershell / C# class to start a GUI Windows Process on the desktop/session of any logged-in RDP/TS user.
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using System.IO;
namespace heri16
{
/// <summary>
/// Static class to help Start a GUI/Console Windows Process as any user that is logged-in to an Interactive Terminal-Session (e.g. RDP).
Angular Firebase (channel):
https://www.youtube.com/channel/UCsBjURrPoezykLs9EqgamOA/search?query=firestore
Quick Start:
https://angularfirebase.com/lessons/firestore-with-angularfire-basics/
OAuth (Google, fb, etc.) Sign-in:
https://angularfirebase.com/lessons/google-user-auth-with-firestore-custom-data/
Python SDK (maybe used on RPi)
@ExtremeGTX
ExtremeGTX / Windows7 USB installer.cmd
Created December 27, 2017 11:44
Windows batch script for making a bootable USB Disk
@echo off
TITLE "Windows 7 USB installer by MOHAMED EL-SHAHAWI"
set _DVD=H:
:Menu
CLS
echo.
echo. Windows 7 USB installer
echo.
@ExtremeGTX
ExtremeGTX / cmd_colorz.ps1
Created November 19, 2017 23:50
PS: colorize command output
.\CompilerSim.exe | foreach-object -process {
switch ($_){
{ $_.tolower().contains("warning")} {Write-Host $_ -foregroundColor Yellow}
{ $_.tolower().contains("error")} {Write-Host $_ -foregroundColor Red}
default {Write-Host $_ -foregroundColor White}
}
}
#Ref: https://stackoverflow.com/a/9530314/2747089
@ExtremeGTX
ExtremeGTX / MyGIT_Ref
Last active October 28, 2017 07:13
My Git Reference
Add Submodule to repo:
git add submodule http://---- source/
Add All Changes
git add .
Add Some files only
git add <filename> <filename2>
Open VIM for commit message before commit: