Skip to content

Instantly share code, notes, and snippets.

View KibobiShtrudelz's full-sized avatar
🎯
Focusing

Petar Kolev KibobiShtrudelz

🎯
Focusing
View GitHub Profile
@yohaneslumentut
yohaneslumentut / password.js
Last active May 27, 2021 23:06
strapi custom password reset
'use strict';
/**
* api/password/controllers/password.js
*/
const { sanitizeEntity } = require('strapi-utils');
const formatError = error => [
{ messages: [{ id: error.id, message: error.message, field: error.field }] },
];
@KibobiShtrudelz
KibobiShtrudelz / variousCountryListFormats.js
Created November 17, 2020 06:15 — forked from incredimike/variousCountryListFormats.js
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
// List of all countries in a simple list / array.
@matkl
matkl / firstDayOfMonth.js
Created July 20, 2016 03:06
Get first day of month in JavaScript
export default function getFirstDateOfMonth() {
const now = new Date();
return new Date(now.getFullYear(), now.getMonth());
}
@incredimike
incredimike / variousCountryListFormats.js
Last active April 30, 2024 11:10
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//