Skip to content

Instantly share code, notes, and snippets.

thanks everyone for coming it's so great to see all the old friends and all the new friends and especially all the very cool things everyone's doing I want to doubly thank Alex for scheduling a talk before mine that was so full of amazing Graphics that no one would possibly be able to Bear anymore and I could I could leave them out of my talk so this is a design and practice and the objective here is to demystify designs so much I think somewhat I think I've given a few talks in the past they're about a lot of the ideas in design but left the concrete practice of it sort of underspecified and it's led to maybe a certain uh imagined magicness to to design that I wanted to spell I think design is something that you can learn to do I think it's something that has concrete activities you know practices or things that we do oh by the way if you're playing word definition Bingo you're going to wish you had like more than one card today uh and uh and to try to talk you through some of the I what I think are kind of
@bahulneel
bahulneel / design.md
Last active December 7, 2023 10:21
Hybr Automated Vetting Design

Design

Data model

---
title: Vetting Preferences Entity Relationships
---
erDiagram
    Property 1--0+ PropertyTenant : prefers
    PropertyTenant {

Keybase proof

I hereby claim:

  • I am bahulneel on github.
  • I am bahulneel (https://keybase.io/bahulneel) on keybase.
  • I have a public key ASBoanAStRexJFUVJy0Fn5nlg8N-16hKzUT8YN-MZk3f1wo

To claim this, I am signing this object:

@bahulneel
bahulneel / negation.clj
Created March 20, 2018 15:20
Not Join in datascript
(def conn (d/create-conn {}))
(def data
[{:a 1 :b 2}
{:a 2 :b 3 :c true}])
(d/transact! conn data)
(defn not-join
[db q vars where]
@bahulneel
bahulneel / pull_one.clj
Created September 20, 2016 15:15
Get all the attributes of a datomic entity (1 deep)
(->> eid
(d/q '[:find ?an ?v ?cn
:in $ ?e
:where
[?e ?a ?v]
[?a :db/ident ?an]
[?a :db/cardinality ?c]
[?c :db/ident ?cn]]
db)
(reduce (fn [m [k v c]]
(defn wrap-save-content [handler content-type]
(fn [request]
(if (= content-type (get-in request [:headers "Content-Type"]))
(let [temp-file (clojure.java.io/file ...)]
(copy (:body request) temp-file)
(handler (assoc request :body temp-file)))
(handler request))))
@bahulneel
bahulneel / timeQueries.php
Created January 20, 2012 19:22
Counts queries and the time they spend executing
<?php
function removeVars($sql)
{
$sql = preg_replace('/(\b)\d+(\b)/', '\1?\2', $sql);
$sql = str_replace('?, ', '', $sql);
$sql = str_replace("\t", ' ', $sql);
return $sql;
}