Skip to content

Instantly share code, notes, and snippets.

View Drozerah's full-sized avatar
💭
DEV

Thomas G. Drozerah

💭
DEV
View GitHub Profile
@Drozerah
Drozerah / about-me.gif
Last active July 16, 2023 13:02
About Me
about-me.gif
@Drozerah
Drozerah / subStringCounter.js
Last active April 14, 2019 00:01
Return the frequency of a substring in a string
/**
* Return the frequency of a substring in a string
* @param {string} string - The string.
* @param {string} string - The substring to count.
* @returns {number} number - The frequency.
*
* @author Drozerah https://gist.github.com/Drozerah/2b8e08d28413d66c3e63d7fce80994ce
* @see https://stackoverflow.com/a/55670859/9370788
*/
const subStringCounter = (string, subString) => {
@Drozerah
Drozerah / Firebase-Query.md
Created February 13, 2019 20:47
Firebase Realtime Database API - Query Exemples

Firebase Realtime Database API - Query Exemples

Documentation : firebase.database.Reference

── Query Methods ── firebase.database.Query

  orderByChild    (key)       Order children at location by the value of specified grandchild key.
  orderByKey      ()          Order children at location by child keys.

orderByValue () Order children at location by child values.

@Drozerah
Drozerah / 'npm vue init' with Vue CLI 3.md
Last active February 12, 2019 15:03
Using 'vue init' command line with Vue CLI 3 installed

Using 'vue init' command line with Vue CLI 3 installed

Vue CLI 3 uses the same vue binary, so it overwrites Vue CLI 2 (vue-cli). If we still want to use the vue init command when the Vue CLI 3 is installed, we need to install a global package :

npm install -g @vue/cli-init

This package enable vue init command again, @vue/cli-init is an alias to the old vue-cli@2.x.

Usage