This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns jammer.crypto | |
(:import | |
(javax.crypto Mac) | |
(javax.crypto.spec SecretKeySpec) | |
(java.math BigInteger))) | |
;; Functions used for authenticating pusher clients. | |
;; The crypto stuff is ripped out of the middle of the real clojure | |
;; pusher library by bblimke | |
;; https://github.com/bblimke/clj-pusher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
lein upgrade | |
lein deps | |
lein uberjar my-main-namespace.core | |
cp ./*-standalone.jar ~/run.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/env python | |
# Stephen Olsen | |
# Script used to hack the stripe ctf level 8 PasswordDB. | |
# Captures the flag! | |
import requests | |
import re | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
# global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste into web console | |
s = document.createElement('script'); | |
s.setAttribute("type", "text/javascript"); | |
s.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"); | |
document.getElementsByTagName("head")[0].appendChild(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns markerbot.core | |
(:require [taoensso.timbre :as log] | |
[clojure.data.json :as json] | |
[clojure.string :as s] | |
[clj-http.client :as client]) | |
(:import (java.net Socket) | |
(java.io PrintWriter InputStreamReader BufferedReader)) | |
(:gen-class)) | |
;; marksy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn reducer | |
;; Removes 5 and the item after it from a sequence. | |
[{:keys [flag seq]} item] | |
(cond | |
flag {:flag false :seq seq} | |
(= item 5) {:flag true :seq seq} | |
:else {:flag false :seq (conj seq item)})) | |
(:seq (reduce reducer {:flag false :seq []} [1 2 3 4 5 6 7 8 9 10])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns game.macros.profiling) | |
;; Must require this and also | |
;; (:use [game.profiling :only [start-time! stop-time!]]) | |
(defmacro profile | |
"Wraps the body in the game.profiling calls" | |
[function-name & body] | |
`(let [profile# (start-time! ~function-name) | |
result# ~@body] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns saolsen.draw-2d) | |
;; Draw stuff (and never care about ie ever) | |
;; There's obviously a ton this lib doesn't do, just adding what | |
;; I need when I need it. | |
(def request-animation-frame | |
(or js/requestAnimationFrame | |
js/webkitRequestAnimationFrame)) | |
(defn get-canvas-context-from-id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns saolsen.particles-simulate | |
(:require [saolsen.draw-2d :as draw])) | |
;; Simple simulated neutonian physics. | |
(defn integrate-particle | |
"Moves the particle a distance based on it's velocity | |
P = P + V*dt | |
Simple collisions with walls reverse velocity. | |
Returns a new particle. | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns goup-engine.core | |
(:import (com.jme3.app SimpleApplication) | |
(com.jme3.material Material) | |
(com.jme3.math ColorRGBA) | |
(com.jme3.math Vector3f FastMath Quaternion) | |
(com.jme3.renderer RenderManager) | |
(com.jme3.scene Geometry Node) | |
(com.jme3.scene.shape Box Quad) | |
(com.jme3.input KeyInput) | |
(com.jme3.input.controls KeyTrigger ActionListener) |
OlderNewer