Skip to content

Instantly share code, notes, and snippets.

View a7madgamal's full-sized avatar

Ahmed Hassanein a7madgamal

View GitHub Profile
@a7madgamal
a7madgamal / Kaomoji.txt
Last active April 19, 2024 04:12
┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴
Joy
(^ω^)
(-‿‿-)
(o^▽^o)
(⌒▽⌒)☆
<( ̄︶ ̄)>
ヽ(・∀・)ノ
(´。• ω •。`)
( ̄ω ̄)
@a7madgamal
a7madgamal / tasker.js
Last active October 6, 2023 00:02
Tasker Gists
const logs = [];
function logAndExit() {
setLocal("debugtext", logs.join("\n"));
exit();
}
if (typeof todoist_header !== "string") {
logs.push("missing todoist_header!");
logAndExit();
@a7madgamal
a7madgamal / all_events_listener.js
Created August 29, 2023 00:35
listen to all js events
Object.keys(window).forEach((key) => {
if (/^on/.test(key)) {
const name = key.slice(2);
console.log(name);
window.addEventListener(name, (event) => {
const tag = event[Symbol.toStringTag];
// exclude noisy ones
if (!['TransitionEvent', 'MouseEvent', 'PointerEvent', 'AnimationEvent'].includes(tag)) {
console.log(event);
@a7madgamal
a7madgamal / Change Do not disturb DND setting on Macos Big Sur using the terminal.md
Last active July 29, 2023 22:24
Change Do not disturb DND setting on Macos Big Sur using the terminal

defaults read com.apple.ncprefs.plist dnd_prefs

turn on: defaults write com.apple.ncprefs.plist dnd_prefs -data 62706C6973743030D60102030405060708080A08085B646E644D6972726F7265645F100F646E64446973706C6179536C6565705F101E72657065617465644661636574696D6543616C6C73427265616B73444E445875736572507265665E646E64446973706C61794C6F636B5F10136661636574696D6543616E427265616B444E44090808D30B0C0D070F1057656E61626C6564546461746556726561736F6E093341C2B41C4FC9D3891001080808152133545D6C828384858C9499A0A1AAACAD00000000000001010000000000000013000000000000000000000000000000AE

turn off: defaults write com.apple.ncprefs.plist dnd_prefs -data 62706C6973743030D5010203040506070707075B646E644D6972726F7265645F100F646E64446973706C6179536C6565705F101E72657065617465644661636574696D6543616C6C73427265616B73444E445E646E64446973706C61794C6F636B5F10136661636574696D6543616E427265616B444E44090808080808131F3152617778797A7B0000000000000101000000000000000B0000000000000000000000000000007C

@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@a7madgamal
a7madgamal / .zpreztorc
Last active May 7, 2023 14:03
my Prezto config (zsh shell)
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@a7madgamal
a7madgamal / typescript.ts
Last active May 18, 2022 21:30
Typescript intro
////////////////////////////////////////////////////////////////////////////////
// Booleans
////////////////////////////////////////////////////////////////////////////////
const trueOrFalse: boolean = true;
// trueOrFalse = 3
// TS is smart, no need to type EVERYTHING!
const alsoTrueOrFalse = true;
// alsoTrueOrFalse = 3
@a7madgamal
a7madgamal / .gitconfig
Created December 17, 2018 15:52 — forked from arnauldvm/.gitconfig
Git sync all local tracking branches with remotes
[alias]
tracking = "!f() { git for-each-ref --format '%(refname:short):%(upstream:short)' 'refs/heads' | grep -Ev ':$'; }; f"
is-clean-workdir = "!f() { git diff --stat --exit-code || { echo \"Workdir dirty\"; exit 1; }; }; f"
is-clean-index = "!f() { git diff --stat --cached --exit-code || { echo \"Index dirty\"; exit 2; }; }; f"
is-clean = "!f() { git is-clean-workdir && git is-clean-index; }; f"
co-merge = "!f() { local=\"$1\"; remote=\"$2\"; git checkout \"$local\"; git merge --ff-only \"$remote\"; }; f"
current-branch = rev-parse --abbrev-ref HEAD
sync = "!f() { git stash push -u -m AUTO_STASH && git is-clean || { echo Aborting sync.; exit 1; }; current=$(git current-branch); git fetch --all; git tracking | while IFS=: read local remote; do echo \"Merging $local with $remote\"; git co-merge \"$local\" \"$remote\"; done 3>&1 1>&2 2>&3 | grep -iE --color 'fatal|$' 3>&1 1>&2 2>&3; git checkout \"$current\"; git stash pop; }; f"
@a7madgamal
a7madgamal / hireAsoundclouder.json
Created July 25, 2017 03:17
Hire a Soundclouder spreadsheet as json format
[
{
"company": "AdMass",
"role": "Data Engineer",
"location": "New York, NY",
"remote": "No",
"jobspec": "https://angel.co/admass/jobs/260672-data-engineer",
"comment": "Social media data is some of the richest behavioral data that exists. People post on social media about what they’re eating, where they’re going, what they’re wearing, who they’re with, etc. However, most brands have very limited access to this data and therefore don’t know how to create the best experiences and ads for their community. AdMass changes this by integrating directly with brands to gather data and help them understand who their customers area. We combine data from several sources, including the brand’s CRM, social media platforms, and web analytics.\n\nWe aren’t looking for someone with a specific degree or number of years of experience in a slew of different technologies. We’re looking for someone that will thrive as a data engineer at our early-stage start up."
}, {
"company": "LAUNCH POTATO",
@a7madgamal
a7madgamal / example-1.ts
Created March 16, 2021 18:57
medium-article-typescript
//test