Skip to content

Instantly share code, notes, and snippets.

View m13m's full-sized avatar
🏠
Working from home since 2021

Maqbool Khan m13m

🏠
Working from home since 2021
View GitHub Profile
@m13m
m13m / chsh.md
Last active June 13, 2017 06:21
chsh -s /bin/zsh username
sudo passwd username

Webhooks vs Polling

What are webhooks, and why should you be using them? A webhook is a way to deliver real-time data to applications. Unlike traditional APIs where you need to poll for data frequently in order to get quasi real-time information, webhooks send data immediately.

You can think about webhooks like push notifications on your mobile phone. Rather than burning up the battery on your phone fetching information (polling) from applications to get updates, push notifications (webhooks) automatically send data based on event triggers. And just like push notifications, webhooks are less resource-intensive.

How Do Webhooks Work?

A webhook is an HTTP request (typically a POST sent to a pre-defined callback URI, where the server application is configured to handle the request on that URI. In many cases, webhooks are triggered by stimulus events, making them a faster and more efficient met

RHEL, Fedora and CentOS based distributions We currently ship the stable 64-bit VS Code in a yum repository, the following script will install the key and repository:

sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'

Then update the package cache and install the package using dnf (Fedora 22 and above):

dnf check-update sudo dnf install code

#NPM
NPM_PACKAGES="${HOME}/.npm-packages"
PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
alias open="xdg-open"
# If you come from bash you might have to change your $PATH.

formatting elements of an array in C printf(((i % 4) != 3) ? "\t" : "\n");

@m13m
m13m / gnome terminal bell
Created July 14, 2015 19:41
Gnome Terminal Bell Enable
pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg
@m13m
m13m / hello.txt
Created September 21, 2017 17:39
AaMilne
AalbertTorsius
AamodSane
AarhusMoedeAugust
AaronBlack
AaronBridges
AaronFaby
AaronGray
AaronHinni
AaronHumphrey
[Desktop Entry]
Encoding=UTF-8
Name=Pharo
GenericName=Pharo
Exec=pharo
Icon=/opt/pharo6.1–64/icons/Pharo.png
Terminal=false
Type=Application
StartupNotify=false
Categories=Development;