Skip to content

Instantly share code, notes, and snippets.

View amrHassanAbdallah's full-sized avatar
🤓
Only the paranoid survive

Amr Hassan AbdUllah amrHassanAbdallah

🤓
Only the paranoid survive
View GitHub Profile
#!/bin/bash
find . -maxdepth 1 -type f -name "archive_*" -exec rm {} \;
# Get the current version from manifest.json
current_version=$(jq -r .version manifest.json)
# Increment the version (assuming it's a semantic versioning format)
new_version=$(echo $current_version | awk -F. -v OFS=. '{$NF=$NF+1; print $0}')
# Update the version in manifest.json
// Unfolllow pages with low followers count
// https://www.linkedin.com/mynetwork/network-manager/company/
// scroll till the end of the page
let scrollLimit = 20
for (let i = 0; i < scrollLimit; i++) {
document.querySelector("main.scaffold-layout__main").scrollIntoView({ block: "end" })
await new Promise(resolve => setTimeout(resolve, 200));
@amrHassanAbdallah
amrHassanAbdallah / config.js
Created December 31, 2022 15:25
Puppeteer linkedin login snippet
let config = {
linkedin: {}
};
config.default_stuff = [];
config.linkedin.email = process.env.LINKEDIN_EMAIL || 'username';
config.linkedin.password= process.env.LINKEDIN_PASSWORD || 'password';
module.exports = config;
@amrHassanAbdallah
amrHassanAbdallah / sys-design-template
Last active October 15, 2023 14:44
System design template
## Brief about the problem
## Functional requirements
> staff such as login, signup...etc
## Non-functional requirements
> staff like availability reliability, performance, consistency, read vs write heavy, security, monitoring..etc
@amrHassanAbdallah
amrHassanAbdallah / config.md
Last active March 19, 2022 22:19
Configure MX 3 mouse
@amrHassanAbdallah
amrHassanAbdallah / config.md
Created March 19, 2022 21:54
Configure MX 3 mouse

Follow the steps outlined below https://github.com/PixlOne/logiops#readme

Then create a new file called logid.cfg in /etc with the following content

// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
@amrHassanAbdallah
amrHassanAbdallah / instructions.md
Last active March 18, 2022 18:52
How to add aws credentials to a k8s deployment

First get your access key ID and secret access key Then login to your aws account using the below command

aws configure

And after entering all the required fields.

Copy the content of the ~/.aws/credentials file using the below command

 cat ~/.aws/credentials | tail -n 5 | head -n 5 | base64
@amrHassanAbdallah
amrHassanAbdallah / Tree.js
Created February 19, 2021 19:33
Algorithms in javascript
///
class Node{
constructor(val){
this.right = null
this.left = null
this.data = val
}
}
@amrHassanAbdallah
amrHassanAbdallah / channels
Last active January 11, 2020 11:42
golang tips and tricks
timer := time.NewTimer(5 * time.Second)
resultChan := make(chan int)
go func(){
resultChan <- verExpensiveOperation()
}
select {

// each component conssit of import React, { Component } from "react";

And a method which contains the render part `class {method name} extends Component { render() { return ( // some html content // className instead of class // Also if the component takes any variables from the caller will use {this.props.(variable_name)}