Skip to content

Instantly share code, notes, and snippets.

View amonks's full-sized avatar
🐋
🐟🐠🐡

Andrew Monks amonks

🐋
🐟🐠🐡
View GitHub Profile
// bookmarklets work because when you click link that starts with `javascript:`,
// instead of following the link, the browser executes the javascript.
javascript:
// get the <body> element, store it in a variable for later
var bodyTag = document.getElementsByTagName("body")[0];
// I want to use jQuery in my bookmarklet, so first I'll make a <script> element for it
var script = document.createElement("script");
// then I'll set the <script src=""> to jquery's url

ACTIVE AUTHENTICATION @ DARPA // Andrew Monks

Project description

Goals

DARPA first announced Active Authentication in 2011. The project seeks to replace password-based authentication with what I might have intuitively called a more active model: rather than requiring the user to take a specific login action (which can be discretely spoofed), a device should continually gather data based on usage patterns (typing speed, mouse movement, …) and then compare that data to the known patterns of an authorized user. As the system gains confidence that its user is authorized, it will gradually (but over a very short duration of perceived human time) remove access restrictions. If the system detects an unauthorized user, it'll shut down and call security (or follow whatever other procedure, as specified).

Timeline

#!/usr/bin/env ruby
require 'rubygems'
require 'roo'
pwd = File.dirname(__FILE__)
Dir.glob("#{pwd}/*.xls") do |file|
file_path = "#{pwd}/#{file}"
file_basename = File.basename(file, ".xls")
xls = Roo::Excel.new(file_path)
@amonks
amonks / gestures.md
Created May 14, 2014 18:38
final paper

Motion Control

Human Machine Interaction / Andrew Monks

Intro

I'm personally super excited about realtime 3d gesture sensors like the Kinect or the LeapMotion.

I don't think there's an established name for this category of devices yet, so I'm gonna use the more general term, Motion Controllers as a synechdoche for the smaller subset of devices I'm talking about.

;here's the main function, it uses 'map' which we define below
(define (make-circles list-of-colors)
(my-map (lambda (color)
(circle 12 'solid color))
list-of-colors
))
;replacement for built-in 'map' function
(define (my-map f lst)
(cond
(define (longer-than n list-of-strings)
(map (lambda (string)
(cond
[(< n (string-length string)) string]
[else null]
))
list-of-strings
)
)
require 'sinatra'
require 'slim'
get '/' do
@n = 10
slim :items
end
get '/:n' do
@n = params[:n]
// file of.sublime-build
{
"cmd": ["make"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${project_path:${folder}}",
"selector": "source.c, source.c++",
"variants":
[
{

Response to Magritte reading on Fantômas

Andrew Monks

Personally, the moment in Magritte's response to Fantômas that most interested me was at the end of the coup de theatre when he posited that Fantômas can only be captured by entering his dreams.

His notes were published in 1928, the year after he moved to France and became acquainted with André Breton and joined the surrealist group. André Breton defined the goal of the surrealists as, 'to resolve the previously contradictory conditions of dream and reality into an absolute reality, a super-reality'.