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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script async="async" src="newsfoot.js"></script> | |
<style> | |
.newsfoot-footnote-container { | |
position: relative; | |
display: inline; | |
} |
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
Copyright (c) 2018, Andrew Brehaut | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, | |
this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, | |
this list of conditions and the following disclaimer in the documentation |
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
Copy the text on line 3 and paste it as the location of a new bookmark in your browser. | |
javascript:void (function%20()%20%7B%20%20%20%20%20function%20handler(ev)%20%7B%20%20%20%20%20%20%20%20%20document.body.removeEventListener(%22click%22,%20handler);%20%20%20%20%20%20%20%20%20%20ev.target.parentElement.removeChild(ev.target);%20%20%20%20%20%20%20%20%20ev.preventDefault();%20%20%20%20%20%20%20%20%20ev.stopPropagation();%20%20%20%20%20%7D%20%20%20%20%20%20document.body.addEventListener(%22click%22,%20handler);%20%7D)(); |
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
type Hashcode = number; | |
interface IHashable { | |
hashcode(): Hashcode; | |
equals(o: IHashable): boolean; | |
} | |
type Association<K extends IHashable, V> = [K, V]; |
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
interface IMessage<TKey extends string, TPayload> { | |
key: TKey; | |
payload: TPayload; | |
} | |
type GenericMessage = IMessage<string, any>; | |
module foo { | |
type FooBarKeyT = "foo.bar"; | |
const FooBarKey: FooBarKeyT = "foo.bar"; |
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
This code is influenced by https://github.com/hiredman/clojurebot/blob/master/src/hiredman/clojurebot/core.clj |
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
;; Sorry about the horrible code. This is my first shot at a core.logic program. | |
;; | |
;; Basically this is a change calculator that returns all possible combinations of change for a given | |
;; total. Instead of being about money its about monsters for tabletop RPGs. | |
(require '[clojure.core.logic :as l] | |
'[clojure.core.logic.fd :as fd]) | |
(defn allocate-monsterso [points monsters out] | |
"This relation finds all the allocations of monsters for the given points. |
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
Copyright (c) 2013 Andrew Brehaut | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body > div { | |
position: relative; | |
height: 50px; | |
margin-bottom: 10px; | |
} | |
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
from render import render | |
def some_context(request): | |
return {…} | |
def some_different_context(request): | |
return {…} | |
@render("template.html") |
NewerOlder