Skip to content

Instantly share code, notes, and snippets.

View lunfel's full-sized avatar

Mathieu Tanguay lunfel

View GitHub Profile
lunfel /
Last active October 27, 2020 20:05
Git proxy script to prevent accidentally checking out to another branch
#!/usr/bin/env bash
# This will not block non-interractive shell execution
if [ ! -z "$PS1" ]; then
command git $@
exit 0
case $1 in
lunfel / index.js
Created March 9, 2018 16:20
Login class based on tymondesigns/jwt-auth
View index.js
import http from '@/services/http'
import store from '@/store'
import router from '@/router'
import moment from 'moment'
import User from '@/entities/user'
export default class Auth {
static async login ({email, password}) {
try {
const response = await`/api/auth/login`, {email, password})