Skip to content

Instantly share code, notes, and snippets.

View igbominadeveloper's full-sized avatar
🏠
Working from home

Favour Afolayan igbominadeveloper

🏠
Working from home
View GitHub Profile
@nwamugo
nwamugo / ah.test.js
Last active March 24, 2019 21:51
Test demo for team Zinnia
import request from 'supertest';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import app from '../app';
chai.use(chaiAsPromised);
const { expect } = chai;
const server = request(app);
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@hackjutsu
hackjutsu / upstream.md
Last active December 11, 2023 07:44
[set upstream] What does '--set-upstream' do? #tags: git
git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch

# show up which remote branch a local branch is tracking
git branch -vv

sets the default remote branch for the current local branch.

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 24, 2024 06:43
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites