Skip to content

Instantly share code, notes, and snippets.

@dhamidi
dhamidi / example.esh
Created December 18, 2013 08:16
ERB-like template processor in POSIX AWK. Usage: ./template.awk < input.esh | sh > output
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><%= "$TITLE" %></title>
<script type="text/javascript" src="jquery.js"></script>
</head>
<body>
<p>It's alive!</p>
<ul>
@dhamidi
dhamidi / AAAS.md
Last active December 31, 2015 02:59 — forked from leehambley/AAAS.md
Fix some typos.

Problem

Web applications need understand what permissions are granted to a current user in two key areas.

  1. When enforcing the permission server side (e.g returning 403 when trying to access a resource outside of one's graph)
  2. When rendering the user interface, so as not to render misleading controls (e.g "Edit this Widget", if the user lacks the appropriate permissions.

Further, in many applications in the wild (for better, or worse, perhaps I need new friends and colleagues) I've seen ways implemented to nerf or flat-out disable authorisation controls. In addition to the regular graph-based authorisation flow, the concept of super users is prevelant, and dangerous.

Background

@dhamidi
dhamidi / .inputrc
Created September 11, 2013 13:37
My readline configuration
$include /etc/inputrc
set bind-tty-special-chars off
set skip-completed-text on
set bell-style visible
"\C-x\C-e": edit-and-execute-command
"\C-xa\"": "\"\C-x\C-x\C-f\""
"\C-xa(": "(\C-x\C-x\C-f)"