Skip to content

Instantly share code, notes, and snippets.

View msalahz's full-sized avatar
🎯
Focusing

Mohammed Zaghloul msalahz

🎯
Focusing
View GitHub Profile
@msalahz
msalahz / credential-template.ts
Last active February 17, 2023 14:42
ULS Membership Identification
export default {
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://schema.org/docs/jsonldcontext.json'
],
type: [
'VerifiableCredential',
],
issuer: {
id: ''
@msalahz
msalahz / Activate Office 2019 for macOS VoL.md
Created January 22, 2022 10:03 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

// .eslintrc.js
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'react-app',
'plugin:prettier/recommended',
],
@msalahz
msalahz / MN AJV JSON Schema
Created January 22, 2020 13:44
AJV JSON Schema
{
"definitions": {},
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": ["contentType", "content"],
"additionalProperties": false,
"properties": {
"contentType": {
"$id": "#/properties/contentType",
@msalahz
msalahz / test.js
Created December 31, 2019 14:07
e2e test
/// <reference types="cypress" />
// constants
const TODO_ITEM_ONE = "Learn some Vue JS";
let TODO_ITEM_TWO = "Create tests with cypress.io";
let TODO_ITEM_THREE = "Apply applitools visual testing";
describe("Todo App Test Suite", () => {
// before each test, make sure to visit the home page of the app
beforeEach(() => {
@msalahz
msalahz / docker_kill.sh
Created April 26, 2019 11:04 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@msalahz
msalahz / batchPrettier.md
Created April 16, 2018 19:38 — forked from Mohamed3on/batchPrettier.md
Run prettier on all JS files in a directory
  1. Install prettier
  2. Make a .prettierignore file, and add directories you'd like prettier to not format, for example: **/node_modules
  3. Run prettier --write "**/*.js" *Don't forget the quotes.
  4. Optional: if you want to format JSON/SCSS files too, replace js with json/scss.
@msalahz
msalahz / GitHub-Desktop-Bitbucket.md
Created March 21, 2018 06:20 — forked from glueckpress/GitHub-Desktop-Bitbucket.md
[How-to] Use GitHub Desktop to clone and commit to a Bitbucket repository just as you would with any GitHub repository. (Mac)

Clone Bitbucket Repository and Add it to GitHub Desktop App (Mac)

You can’t clone a Bitbucket repo using GithHub Desktop directly. Instead you would have to:

  1. Clone the Bitbucket repo locally via command line.
  2. Add the cloned repository to your GitHub Desktop app.

After completing these 2 steps, you’ll be able to execute sync, push, pull, commit, and other git commands available in GitHub Desktop for your Bitbucket repository just as you would for any GitHub repository.

You will need your Bitbucket repository’s git URL as available on the Overview page of your repository:

@msalahz
msalahz / .eslintrc
Last active March 9, 2018 04:34
eslint
module.exports = {
'extends': [
'airbnb',
'prettier',
'prettier/react'
],
"parser": "babel-eslint",
'parserOptions': {
'ecmaVersion': 8,
'ecmaFeatures': {