Skip to content

Instantly share code, notes, and snippets.

View bradcypert's full-sized avatar
🍾
I'm now available for purchase as an NFT!

Brad bradcypert

🍾
I'm now available for purchase as an NFT!
View GitHub Profile
public final class Demo {
// access flags 0x11
public final main()V
L0
LINENUMBER 3 L0
ICONST_4
ANEWARRAY java/lang/Integer
DUP
function when(constraints) {
for(obj of constraints) {
var ths = obj['this'];
var d = obj['do'];
if (ths && typeof ths === "function" && d && typeof d === "function") {
var response = ths();
if (response === true) return d()
}
}
}
abstract class Optionable<T> {
abstract value: T;
abstract get<T>(): any;
abstract getOrElse<U>(v: U): T | U;
abstract isEmpty(): boolean;
abstract isDefined(): boolean;
fold<B>(empty: () => B, nonEmpty: (value: any) => B): B {
if (this.isEmpty()) {
return empty();
}

Keybase proof

I hereby claim:

  • I am bradcypert on github.
  • I am bradcypert (https://keybase.io/bradcypert) on keybase.
  • I have a public key whose fingerprint is 0940 9F6C FF51 BEE4 D7CB 7AF2 16FB D744 2DCD 15A4

To claim this, I am signing this object:

(ns sumofcubes.core)
(def TWO (BigDecimal. 2))
(def SQRT_DIG (BigDecimal. 150))
(def SQRT_PRE (.pow BigDecimal/TEN (.intValue SQRT_DIG)))
(def PRECISION (.divide BigDecimal/ONE SQRT_PRE))
(def eight (BigDecimal. 8))
(def neg-one (BigDecimal. -1))
(def one BigDecimal/ONE)
(def half (BigDecimal. 0.5))
function divide2(a,b,mid) {
let num = 0;
let middle = mid || a >> 1;
if (middle * b == a) {
return middle;
} else {
if (middle == 1) {
return 0;
}
(spec/def ::auth-user int?)
(spec/def ::id string?)
(spec/def ::rating string?)
(spec/def ::rate-podcast-spec (spec/keys :req-un [::auth-user ::id ::rating]))
(defn- rate-podcast
[params]
(if (spec/valid? ::rate-podcast-spec params)
(let [user (:auth-user params)
podcast (Integer/parseInt (:id params))
function gau
git status --short --untracked-files=no | grep "M " | cut -c4- | xargs git add
end
require '../vendor/autoload.php';
require '../src/models/dev.php';
$container = new \Slim\Container;
$container['db'] = function ($container) {
$capsule = new \Illuminate\Database\Capsule\Manager;
$capsule->addConnection($container['settings']['db']);
$capsule->setAsGlobal();
(ns hello-world.handler)
(defn main [] (println "Hello World")