Skip to content

Instantly share code, notes, and snippets.

View shalaby's full-sized avatar

Muhammad Shalaby shalaby

  • Egypt
View GitHub Profile
@shalaby
shalaby / typescript-crash.ts
Created April 23, 2022 11:10 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@shalaby
shalaby / mongodb_cheat_sheet_2022.md
Created January 24, 2022 14:55 — forked from codeSTACKr/mongodb_cheat_sheet_2022.md
MongoDB Cheat Sheet 2022
@shalaby
shalaby / clean.sh
Created December 21, 2021 08:46 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@shalaby
shalaby / service.js
Created May 20, 2021 15:47 — forked from cadebward/service.js
Remove `__v` and `_id` from MongoDB
import mongoose, {Schema} from 'mongoose'
export const ServiceSchema = new Schema({
displayName: {type: String, required: true, unique: true}
})
ServiceSchema.set('toObject', {
transform: function (doc, ret) {
ret.id = ret._id
delete ret._id
@shalaby
shalaby / xmonad-default-key-bindings.md
Created October 10, 2020 15:16 — forked from micrub/xmonad-default-key-bindings.md
Xmonad default key bindings

xmonad default key bindings

Action key bindings

Key binding Action
mod - shift - slash Run xmessage with a summary of the default keybindings (useful for beginners)
mod - shift - return Launch terminal
mod - p Launch dmenu
mod - shift - p Launch gmrun
@shalaby
shalaby / org-syntax-cheatsheet.org
Created September 28, 2020 16:53 — forked from hoeltgman/org-syntax-cheatsheet.org
Org-mode Syntax Cheat sheet

org-syntax-cheatsheet.org

@shalaby
shalaby / org-mode-reference-in.org
Created September 26, 2020 19:59 — forked from drj42/org-mode-reference-in.org
This is a cheat sheet for Emacs org-mode... in org-mode format!
@shalaby
shalaby / doom.txt
Created September 21, 2020 19:55 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch