Skip to content

Instantly share code, notes, and snippets.

@jackrusher
jackrusher / stylometry.clj
Last active May 24, 2017 11:14
A bit of poor man's stylometry using Etymological Wordnet
;; Some fun with the etymological wordnet database
;; <http://www1.icsi.berkeley.edu/~demelo/etymwn/>
;; you'll need the database from that link and this table
;; <https://gist.github.com/jackrusher/b42152c40cb56b466085>
;; to eval the code in this gist within your own environment.
(defn fixup-name [name]
(-> name
clojure.string/lower-case
(clojure.string/replace #": " "-")
@jlongster
jlongster / forms-with-react.js
Last active May 8, 2017 14:15
higher-order form components w/react
// Simple wrapper to use bootstrap's grid system to position elements side-by-side
var VerticalFieldsElement = React.createClass({
render: function() {
return dom.div(
{ className: 'clearfix' },
React.Children.map(this.props.children, function(child) {
if(!child) {
return child;
}
function id(a) {
return a
}
function compose(f, g){ return function(x) {
return f(g(x))
}}
function partial(f, x) {
return function(y) {
@DrBoolean
DrBoolean / falg.js
Created December 15, 2015 18:19
F-algebra es2015
const daggy = require('daggy')
const {compose, curry, map, prop, identity, intersection, union} = require('ramda');
const inspect = (x) => { if(!x) return x; return x.inspect ? x.inspect() : x; }
// F-algebras
// Fix
// ============
// Fx is a simple wrapper that does almost nothing. It's much more useful in typed languages to check that we have a recursive f (Fix f)
@kourge
kourge / enum.ts
Last active March 23, 2017 00:05
String enums in TypeScript
export enum Event1 {
SIGN_IN_WALL = 'Sign In Wall' as any,
SIGN_UP = 'Sign Up' as any,
}
{
const x = Event1.SIGN_UP; // type = Event1
const y: number = x;
// Verdict: approach is succint, but incorrectly allows type widening to number.
}
@li0nel
li0nel / certbot
Created July 12, 2018 08:03
Execute Certbot
# Use Let's Encrypt certbot to order a free certificate
certbot certonly --non-interactive --manual \
--manual-auth-hook "./auth-hook.sh UPSERT your_domain.com" \
--manual-cleanup-hook "./auth-hook.sh DELETE your_domain.com" \
--preferred-challenge dns \
--config-dir "./letsencrypt" \
--work-dir "./letsencrypt" \
--logs-dir "./letsencrypt" \
--agree-tos \
--manual-public-ip-logging-ok \

NFT Thoughts, Essays, Writings

I'm collecting here a few essays on the net about tokenization in the art world. This list is likely biased and by no means exhaustive.