I hereby claim:
- I am defrex on github.
- I am defrex (https://keybase.io/defrex) on keybase.
- I have a public key whose fingerprint is 1486 B752 395C B552 C0DF 8604 D2BB 926C 932E D7E4
To claim this, I am signing this object:
import fetch from 'cross-fetch' | |
import jwtDecode from 'jwt-decode' | |
import moment from 'moment' | |
import { NextPageContext } from 'next' | |
import { destroyCookie, parseCookies, setCookie } from 'nookies' | |
export class AuthClient { | |
baseUrl = 'https://backend-[whatev].nhost.app' | |
stateChangeCallbacks: (() => void)[] = [] | |
context?: NextPageContext |
import { subDays, subWeeks } from 'date-fns' | |
import { Repitition } from './Repitition' | |
describe('Repitition', () => { | |
test('findByDate', async () => { | |
const base = new Date() | |
const twoWeeksAgo = subWeeks(base, 2) | |
const twoWeeksOneDayAgo = subDays(twoWeeksAgo, 1) | |
const weeklyStartingTwoWeeksAgo = await Repitition.create({ |
{ | |
"title": "Spendwell JS Test", | |
"posts": [ | |
{ | |
"title": "Power", | |
"gif": "http://i.giphy.com/WmDxBPSHdEBtS.gif" | |
}, | |
{ | |
"title": "Disgusting", | |
"text": "http://i.giphy.com/xThuWgQbkshXOAlUHu.gif" |
from __future__ import unicode_literals, print_function | |
import re | |
import colorama | |
header_regex = re.compile('^HTTP_') | |
def print_header(key, value): |
from django.core.management.commands.shell import Command as ShellCommand | |
class Command(ShellCommand): | |
shells = ['ptpython', 'ipython', 'bpython'] | |
def ptpython(self): | |
from prompt_toolkit.contrib.repl import embed | |
embed(globals(), locals(), vi_mode=False, history_filename=None) |
from storages.backends.s3boto import S3BotoStorage | |
class StaticS3BotoStorage(S3BotoStorage): | |
location = 'static' | |
class MediaS3BotoStorage(S3BotoStorage): | |
location = 'media' |
I hereby claim:
To claim this, I am signing this object:
function parseUrl(url) { | |
var urlParser = document.createElement('a'); | |
urlParser.href = url; | |
return { | |
hostname: urlParser.hostname, | |
pathname: urlParser.pathname, | |
search: urlParser.search, | |
hash: urlParser.hash, | |
port: urlParser.port, |
import markdown as mkdn | |
from django import template | |
from django.utils.safestring import mark_safe | |
register = template.Library() | |
@register.filter() | |
def markdown(value): |
def pretty_request(request): | |
headers = '' | |
for header, value in request.META.items(): | |
if not header.startswith('HTTP'): | |
continue | |
header = '-'.join([h.capitalize() for h in header[5:].lower().split('_')]) | |
headers += '{}: {}\n'.format(header, value) | |
return ( |