Skip to content

Instantly share code, notes, and snippets.

View bentedder's full-sized avatar

Ben Tedder bentedder

  • Smarsh
  • St Paul, MN
View GitHub Profile

JSON Web Tokens

What they are

  • an open standard defining a compact and self-contained way for securely transmitting information between parties as a JSON object.

Why to use them

  • stateless sessions (load balancers, separated front and back-end)
  • easy logout
  • save on SQL queries to check user or permissions every request
@bentedder
bentedder / calendar.component.html
Last active August 13, 2019 07:01
calendar component angular 4
<div class="calendar">
<div class="calendar-navs">
<div class="month-nav">
<button (click)="prevMonth()">&lt;</button>
<span class="p4">{{ currentDate.format('MMMM') }}</span>
<button (click)="nextMonth()">&gt;</button>
</div>
<div class="year-nav">
<button (click)="prevYear()">&lt;</button>
<span>{{ currentDate.format('YYYY') }}</span>
@bentedder
bentedder / chart.component.scss
Last active March 5, 2018 14:30
Stacked Bar Chart
#myChart {
.axis {
path {
stroke: #ccc;
}
text {
fill: #999;
font-size: 0.6rem;
}
}
@bentedder
bentedder / .block
Created March 19, 2018 14:49 — forked from guypursey/.block
Wrapping long labels with D3 v4 (sample data)
license: gpl-3.0