Skip to content

Instantly share code, notes, and snippets.

Adam Harvey - CV Dazzle and HyperFace

Lakshmi Subramanian - Entrupy startup

  • Microscopic photos of brand handbag textures & parts to authenticate

Siddharth Garg, NYU

  • Integrated circuits can be depackaged & delayered to gain information that is intended to be private
    • Potential solution: Camouflaging. Dummy contacts camouflage Boolean functionality.

(Pictured circuit could implement XAND/NAND or NOR but reverser couldn’t determine.)

  • Camouflaging has a per-gate cost.
  • Small # of judicioously selected gates is camouflaged, attacker needs > 1000s of years to decamouflage.
@evanlh
evanlh / lSys.ml
Created March 21, 2017 01:57
yertle_ocaml.ml
(*
Spitballing...
L system = {
alphabet: set of symbols, terminals and variables,
start: initial list of symbols,
rules: set of tuples from a symbol to a list of symbols
}
*)
type symbol = Symbol of string;;
@evanlh
evanlh / gist:4d95d81a1e561417c83a397ce24ee650
Created July 20, 2016 01:21
Native DOM cost, back of envelope
tabs--
node count - 26415
private usage - 415 mb
current bytes - 153770302 = 146mb
415 - 146mb = 269mb
drawers--
node count - 10772
private usage - 335 mb
;; -*- emacs-lisp -*-
;;
;; The majority of this config is from Jack Rusher-- https://github.com/jackrusher/dotfiles
;; (Minor personal changes made by me -- @evanlh)
;;
;; I like my emacs to share as many behaviors as possible with OS
;; X and bash, to which end I've customized all three.
(require 'cl) ;; Common Lisp functions
git config --global http.sslVerify false
npm config set strict-ssl false
~/.bowerrc
{
"directory": "bower_components",
"registry": "http://bower.herokuapp.com",
"strict-ssl": false
}
/**
* Creates a new Cart object, with an optional pricing parameter.
* @class
* @param {object} pricing
*/
function Cart(prices){
this.total = 0,
this.pricing = {},
this.contents = {};
function Grid(M, N, mapFunction){
this.grid = [];
this.M = M;
this.N = N;
if (M < 1 || N <1) throw new Error('Grid dimensions must be greater than 0');
if (typeof mapFunction == 'function'){
this.init(mapFunction);
}
<!DOCTYPE html>
<html lang="en" class="mdl-js"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Material Design Lite</title>
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
(ns amplifytest.core)
(defn headerval [str]
(let [intvals (map int (.getBytes str))
len (count intvals)
v (reduce + (map-indexed (fn [i x] (* (Math/pow 26 (- len 1 i)) (- x 64))) intvals))]
(int v)))
(defn -main [& args]
(doseq [line (line-seq (java.io.BufferedReader. *in*))]
@evanlh
evanlh / entropy3.clj
Last active December 16, 2015 11:29
;; Homework III
;; first, some useful functions from the standard library...
(frequencies [1 2 1 2 1 2 3 4 2 3 4 5])
;; => {1 3, 2 4, 3 2, 4 2, 5 1}
;; a convenience function that returns a map from each value in the
;; input to the count of its occurence
;; Evan, here's the python equivalent: