Skip to content

Instantly share code, notes, and snippets.

View magr0s's full-sized avatar
🇺🇦
Working from home

Oleksandr magr0s

🇺🇦
Working from home
View GitHub Profile
@magr0s
magr0s / npm-version-cheatsheet.md
Created September 20, 2023 18:32 — forked from leonardokl/npm-version-cheatsheet.md
npm version cheatsheet

NPM VERSION

Bump a package version

major (Breaking Change)

# version 1.0.0
$ npm version major # 2.0.0
$ npm version premajor # 2.0.0-0
@magr0s
magr0s / Javascript ISO country code to country name conversion
Created May 10, 2020 21:16 — forked from maephisto/Javascript ISO country code to country name conversion
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@magr0s
magr0s / axios-catch-error.js
Created February 23, 2020 10:20 — forked from fgilio/axios-catch-error.js
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 😨
@magr0s
magr0s / .travis.yml
Created December 10, 2019 06:12 — forked from kaiyuan01/.travis.yml
Travis CI Cordova Android build
language: android
node_js:
- 5.5
notifications:
email: false
sudo: false