Skip to content

Instantly share code, notes, and snippets.

View DenoGeek's full-sized avatar

Dennis Kariuki DenoGeek

View GitHub Profile
<div class="chatbox chatbox--tray chatbox--empty">
<div class="chatbox__title">
<h5><a href="#">Customer Service</a></h5>
<button class="chatbox__title__tray">
<span></span>
</button>
<button class="chatbox__title__close">
<span>
<svg viewBox="0 0 12 12" width="12px" height="12px">
<line stroke="#FFFFFF" x1="11.75" y1="0.25" x2="0.25" y2="11.75"></line>
$('.chatbox').css({
'position' : 'fixed',
'bottom' : '0',
'right' : '30px',
'width' : '300px',
'height' : '400px',
'background-color' : '#fff',
'font-family' : 'Lato, sans-serif',
'-webkit-transition' : 'all 600ms cubic-bezier(0.19, 1, 0.22, 1)',
'transition' : 'all 600ms cubic-bezier(0.19, 1, 0.22, 1)',
@DenoGeek
DenoGeek / chat.html
Created February 4, 2019 13:37
The chatter box
<style type="text/css">
.chatbox {
position: fixed;
bottom: 0;
right: 30px;
width: 300px;
height: 400px;
background-color: #fff;
font-family: 'Lato', sans-serif;
@DenoGeek
DenoGeek / token.go
Created February 4, 2019 07:15
Golang Token interceptor
//in main .go just chain the methods like this your namespace may change depending on your app organisation
router.GET("/api/user", middlewares.JwtAuth(A.GetUser))
router.GET("/api/user", middlewares.JwtAuth(A.GetApplications))
//Have a the above JWTAuth taking in a handler and returning one after checks. NOTICE ON SUCCESSFUL CHECKS I NOW CALL THE HANDLER
//THAT WAS PASSED
func JwtAuth(h httprouter.Handle) httprouter.Handle {
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {