Skip to content

Instantly share code, notes, and snippets.

View Frolki1-Dev's full-sized avatar
🐍
It's not a bug. It's only a function with side effects

Frank Giger Frolki1-Dev

🐍
It's not a bug. It's only a function with side effects
View GitHub Profile
@saqueib
saqueib / errorHandler.js
Last active February 18, 2026 14:54
Global error handling using axios interceptor for http calls http://www.qcode.in/api-error-handling-in-vue-with-axios
import axios from 'axios'
import toast from './toast'
function errorResponseHandler(error) {
// check for errorHandle config
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) {
return Promise.reject(error);
}
// if has response show the error
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}