Skip to content

Instantly share code, notes, and snippets.

View coyotespike's full-sized avatar

coyotespike coyotespike

View GitHub Profile
#!/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)
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

Keybase proof

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:

@coyotespike
coyotespike / CSRF
Created July 21, 2015 18:23
Getting a CSRF token from Clojure to ClojureScript
;;; 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*)))
@coyotespike
coyotespike / cljs-CSRF
Created June 25, 2015 16:49
CSRF in Clojure/ClojureScript
;; 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