Skip to content

Instantly share code, notes, and snippets.

@filipelinhares
filipelinhares / settings.json
Created April 30, 2023 19:22
VSCode config
{
"workbench.colorCustomizations": {
// "statusBar.background" : "#222",
"statusBar.foreground": "#ccc",
"statusBar.noFolderBackground" : "#212121",
"statusBar.debuggingBackground": "#263238"
},
"editor.renderWhitespace": "all", // removes whitespace chars
"editor.renderLineHighlight": "none", // removes line highlight
"editor.glyphMargin": false, // removes the space used mainly for debugging indicators
@filipelinhares
filipelinhares / firebase-auth-middleware.js
Last active June 9, 2023 04:45
Firebase Auth Middleware
'use strict'
require('firebase-functions/lib/logger/compat')
const functions = require('firebase-functions')
const admin = require('firebase-admin')
const express = require('express')
const cookieParser = require('cookie-parser')
const cors = require('cors')
try {
@filipelinhares
filipelinhares / vue.md
Last active December 2, 2020 17:17
Presentantion Vue.js - EasyRetro

Vue overview

The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects

Ecosystem

  • Devtools
  • Vue CLI
  • Vue Loader
  • Vue Router
  • Vuex
@filipelinhares
filipelinhares / os-detect.js
Created February 18, 2020 14:27
Simple navigator info helper
// TODO: Rewrite
{
var unknown = '-';
// screen
var screenSize = '';
if (screen.width) {
width = (screen.width) ? screen.width : '';
height = (screen.height) ? screen.height : '';
screenSize += '' + width + " x " + height;
@filipelinhares
filipelinhares / run.sh
Created November 27, 2019 12:46
Self signed SSL certificate
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
@filipelinhares
filipelinhares / welcome.md
Created September 26, 2019 02:30
Suggestions

Please, comment!

@filipelinhares
filipelinhares / Package Control.sublime-settings
Created October 29, 2018 16:32
My Sublime Text settings
{
"bootstrapped": true,
"in_process_packages": [],
"installed_packages":
[
"A File Icon",
"AceJump",
"AdvancedNewFile",
"AutoPEP8",
"Babel",
@filipelinhares
filipelinhares / example.js
Last active September 18, 2018 04:07
Redux
const counter = (state = 0, action) => {
switch (action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
return state - 1;
default:
return state;
}
}
@filipelinhares
filipelinhares / set-selection-range.js
Last active September 18, 2018 03:44
Fix input mask
var defer = typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame : setTimeout
defer( function () { element[0].setSelectionRange(element[0].selectionStart + 1, element[0].selectionStart + 1, 'none') }, 0)
We'll meet again
Don't know where
Don't know when