Skip to content

Instantly share code, notes, and snippets.

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

Charles Lamarque clamarque

🏠
Working from home
View GitHub Profile
@isaumya
isaumya / nuxt-js-firebase-auth-and-cloud-firestore.md
Last active September 14, 2023 12:29
Nuxt JS: Keep user logged in with Firebase Auth and also fetch the necessary User data from Cloud Firestore and put it in your Vuex store if the user is already logged in before rendering the page

Nuxt JS: Keep user logged in with Firebase Auth and also fetch the necessary User data from Cloud Firestore and put it in your Vuex store if the user is already logged in before rendering the page

Step - 1

Install the required packages.

  • If you use npm npm i firebase firebase-admin cookies js-cookie

  • If you use yarn yarn add firebase firebase-admin cookies js-cookie

@Darkside73
Darkside73 / DateRangePicker.vue
Last active February 26, 2020 12:31
Vuetify DateRangePicker (obsolete since Vuetify has built-in range picker)
<template>
<v-date-picker
class="date-range-picker" :value="value" @input="onInput"
color="light-blue" event-color="light-blue lighten-4 date-in-range" :events="selectedRange"
:allowed-dates="allowedDates" no-title multiple
>
<slot></slot>
</v-date-picker>
</template>
@punkdata
punkdata / pm_install.sh
Created November 3, 2017 16:36
Postman Install Ubuntu 17.10
#!/usr/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@m-coding
m-coding / regex-yyyy-mm-dd.js
Last active January 22, 2024 06:36
javascript regex to match date pattern YYYY-MM-DD
// allows YYYY/M/D and periods instead of slashes
// http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd
/^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/
// YYYY-MM-DD and YYYY-M-D
// http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript
/^\d{4}\-\d{1,2}\-\d{1,2}$/
// YYYY-MM-DD
// https://gist.github.com/arth2o/8471150
@afaulkinberry
afaulkinberry / noDuplicates.js
Last active March 5, 2019 21:41
AngularJS - Remove duplicate objects from object array
function(arr){
var newArr = [];
angular.forEach(arr, function(value, key) {
var exists = false;
angular.forEach(newArr, function(val2, key) {
if(angular.equals(value.id, val2.id)){ exists = true };
});
if(exists == false && value.id != "") { newArr.push(value); }
});
return newArr;
@geksilla
geksilla / bootsrap_class_list
Last active April 29, 2023 03:59
Bootstrap css class list
.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead
@tsabat
tsabat / zsh.md
Last active July 7, 2024 16:56
Getting oh-my-zsh to work in Ubuntu