Skip to content

Instantly share code, notes, and snippets.

addalias(){
name=$1
shift;
echo 'alias '"$name"'="'"$@"'"' >> ~/.bashrc && source ~/.bashrc
echo 'Added command name '"$name"' to do '"$@"''
}
grepz(){
history | grep "$@"
}
@ghassanmas
ghassanmas / openedx-repos.json
Last active May 19, 2022 14:21
openedx-repo-count-with
This file has been truncated, but you can view the full file.
[{
"id": 185261509,
"node_id": "MDEwOlJlcG9zaXRvcnkxODUyNjE1MDk=",
"name": "frontend-app-payment",
"full_name": "openedx/frontend-app-payment",
"private": false,
"owner": {
"login": "openedx",
"id": 40179672,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQwMTc5Njcy",
@ghassanmas
ghassanmas / find_common_packages.py
Last active February 16, 2022 00:06
It's just a simple script that check for the package.json for selected MFEs and it then outputs two main thing:
import os
from urllib import request
import json
MFES = ['frontend-app-account','frontend-app-gradebook','frontend-app-profile','frontend-app-learning']
GITHUB_PERFIX = 'https://raw.githubusercontent.com/openedx/'
BRANCH = 'master'
def get_package_json():
for mfe in MFES:
@ghassanmas
ghassanmas / gist0.md
Last active December 18, 2020 14:59
DevOps on AWS cheatsheet
(function() {
listnodes = document.getElementsByClassName("fieldData");
count = 0;
for (var i = 0; i < listnodes.length; i++) {
if (listnodes[i].innerHTML.match(/[0-9]+,[0-9]+|[0-9]+/)) {
str = listnodes[i].innerHTML.match(/[0-9]+,[0-9]+|[0-9]+/)[0]
} else {
continue;
}
if (str.indexOf(',') != -1) {