Skip to content

Instantly share code, notes, and snippets.

View jofftiquez's full-sized avatar
🔥
Building https://easyjoey.com

Joff Tiquez jofftiquez

🔥
Building https://easyjoey.com
View GitHub Profile
@jofftiquez
jofftiquez / 0_reuse_code.js
Created February 16, 2016 03:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

User Data stored to another HIPAA compliant database.

userPII:{
  id123:{
    name:'john doe',
    address:'...',
    etc:'...',
 }
@jofftiquez
jofftiquez / isPalindrome.js
Last active February 1, 2018 17:20
isPalindrome using for in
function foo(s) {
let isPalindrome = true;
for(let i in s) {
if(s[i] !== s[(s.length-1)-i]) {
isPalindrome = false;
}
}
return isPalindrome;
}
@jofftiquez
jofftiquez / JWT Auth Bearer Bible.md
Last active May 19, 2018 06:45
How to use JWT to authenticate REST calls from client side.

JWT Auth Bearer Bible

Token

Upon login the API will provide a jwt token bearer which is on the response headers. Extract the token from the headers.

Sample Token :

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3N1ZXIiOiJhcGkubXlDdXJlLnBoIiwiYXVkaWVuY2UiOiJ3d3cubXlDdXJlLnBoIiwiZW1haWwiOiJqb2ZmdGlxdWV6QGdtYWlsLmNvbSIsImV4cGlyeSI6IjIwMTYtMDItMTZUMDM6NDA6NDUuMTc0WiIsImlhdCI6MTQ1NTU5MDQ0NX0.1tJCtBYyy6DWwnsap_jIp16pzVx1RK8BrxJIXAqrXrE
@jofftiquez
jofftiquez / tmux.conf
Created October 6, 2019 16:50 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
import firebase from 'firebase/app';
import 'firebase/storage';
import { Observable } from 'rxjs';
firebase.initializeApp({
apiKey: process.env.VUE_APP_API_KEY,
authDomain: process.env.VUE_APP_AUTH_DOMAIN,
databaseURL: process.env.VUE_APP_DATABASE_URL,
projectId: process.env.VUE_APP_PROJECT_ID,
storageBucket: process.env.VUE_APP_STORAGE_BUCKET,
@jofftiquez
jofftiquez / firebase-admin-multi-apps-init.md
Last active April 22, 2022 19:29
Firebase admin - how to initialise multiple applications in nodejs.

Firebase Admin Multi App Initialization - ES5

This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.

ES6 version

Using Javascript

require('firebase');
@jofftiquez
jofftiquez / social-buttons.html
Created January 9, 2023 09:23
Social Media Buttons
<div>
<style>
.social-btn-content {
background: #0099cc;
width: 40px;
height: 40px;
text-decoration: none;
border-radius: 100%;
}
</style>
@jofftiquez
jofftiquez / normal-header.html
Created January 19, 2023 06:12
Sample of printing without repeating stick header, and no repeating footer.
<table>
<!-- Header section -->
<thead>
<tr>
<td>
<div style="height: 100px; background: rgb(76, 164, 246);">
<h1>Header</h1>
</div>
</td>
</tr>