Skip to content

Instantly share code, notes, and snippets.

View lunfel's full-sized avatar

Mathieu Tanguay lunfel

View GitHub Profile
@lunfel
lunfel / index.js
Created March 9, 2018 16:20
Login class based on tymondesigns/jwt-auth
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 http.post(`/api/auth/login`, {email, password})
@lunfel
lunfel / git-proxy.sh
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
fi
case $1 in
checkout)