Skip to content

Instantly share code, notes, and snippets.

View msalahz's full-sized avatar
🎯
Focusing

Mohammed Zaghloul msalahz

🎯
Focusing
View GitHub Profile
```jsonc
"Code Gen Instruction": {
"prefix": "instruction-codegen",
"body": [
"\t\"github.copilot.chat.codeGeneration.instructions\": [",
"\t\t{",
"\t\t\t\"text\": \"use JavaScript for all code. use camelCase for variable names, PascalCase for class names. Use spaces for indentation. Use single quotes for strings. Use 2 spaces for indentation.\"",
"\t\t}",
"\t],"
]
@msalahz
msalahz / .eslintignore
Created October 24, 2024 17:33 — forked from jonbeebe/.eslintignore
Recommended ESLint and Prettier config for React TypeScript
src/tests
node_modules
build
dist
dist-ssr
.vscode
public
*.test.js
*.test.jsx
*.test.ts
@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

@msalahz
msalahz / eslint-prettier-ts-react-setup.conf
Created May 3, 2020 10:51 — forked from 0xC0A1/eslint-prettier-ts-react-setup.conf
NextJS / React ESLINT + TS + PRETTIER SETUP
// .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.