I hereby claim:
- I am coyotespike on github.
- I am coyotespike (https://keybase.io/coyotespike) on keybase.
- I have a public key ASC-bCxESFMNIqNoKUSDyoSkdDKZjPMaQaAsC-mOibUzjAo
To claim this, I am signing this object:
;; There are three parts to the problem: | |
;; (1) putting the token on the page on the server-side, | |
;; (2) getting it off on the client-side, | |
;; (3) and then POST-ing it with the request. | |
;;;; One could also GET and then POST using a route, but that makes the CSRF token useless. | |
; 1. Putting the token on the page. | |
; handler.clj |
;;; Here is my hackity approach. Start with Clojure: | |
(ns yourapp.handler | |
(:require | |
[yourapp.homepage :refer [home-page]] | |
[ring.middleware.anti-forgery :refer [*anti-forgery-token*]])) | |
(defroutes routes | |
(GET "/" [] (home-page *anti-forgery-token*))) | |
I hereby claim:
To claim this, I am signing this object:
test | |
;; -*- mode: emacs-lisp; lexical-binding: t -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Layer configuration: | |
This function should only modify configuration layer settings." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
#!/usr/bin/env python3 | |
# Prints only Threes wave: | |
# python3 juggernaut_calculator.py --threes 92.5 | |
# Prints all waves: | |
# python3 juggernaut_calculator.py 92.5 | |
import argparse | |
def calculate_weight(max_weight, percentage): | |
return max_weight * (percentage / 100) |