Skip to content

Instantly share code, notes, and snippets.

View tjbrennan's full-sized avatar

Taylor Brennan tjbrennan

  • San Francisco, CA
View GitHub Profile
@tjbrennan
tjbrennan / AIV.md
Last active February 13, 2024 15:25
AIV short story

AIV

July, 2034.

It’s a hazy late summer afternoon, and Agent Kramer is heading home from his office at City Protection Cyber Division. While idly waiting at the curb for the arrival of his autonomous personal transport, he spots another AI-inhabited vehicle driving erratically up the street. The autonomous car lurches back and forth, then turns directly towards him and accelerates. Just as Agent Kramer starts to back away from the curb edge, the vehicle violently jolts to a stop. Alarmed, he runs over to check on its occupant, but the door refuses to open. He stands back and holds his palm up to the vehicle door as his special-issue crypto-breaker disengages the lock.

“Are you alright?” he asks as he pulls the passenger up from the floor of the vehicle.

“I- I think so. What- what’s happening?” she says, looking around as she steps out of the car.

Keybase proof

I hereby claim:

  • I am tjbrennan on github.
  • I am tjbrennan (https://keybase.io/tjbrennan) on keybase.
  • I have a public key ASCu8S1ER1wEzSXXDKBOvLi7T9xq5mRkGxQ_ZaRImIJVnwo

To claim this, I am signing this object:

There are two cups, one with milk and one with tea.
A teaspoon is taken from the milk cup and stirred into the tea cup.
A teaspoon is then taken from the tea cup and stirred into the milk cup.
Is there more milk in the tea cup or tea in the milk cup?
@tjbrennan
tjbrennan / coffeecake.md
Last active October 26, 2017 00:21
Brenda's Coffeecake

Brenda's Coffeecake

  • 1 box yellow cake mix
  • 1 large box vanilla instant pudding
  • 4 eggs
  • 1/2 tsp baking powder
  • 1 tsp vanilla
  • 1 cup oil
  • 1 cup water
@tjbrennan
tjbrennan / catfacts.js
Last active November 18, 2015 21:42
A cat facts bot for slack outgoing webhook
var http = require('http');
var port = process.env.PORT || 8888;
var name = 'catfacts';
function handle (req, res) {
res.setHeader('Content-Type', 'application/json');
if (req.method === 'POST') {
var body = '';
function multiline (func) {
var str = func.toString();
var result = str.substring(str.indexOf('/*')+2, str.indexOf('*/'));
return result;
}
function foo () {/*
I am
a multiline

Shanghai-Style Hong Shao Rou

Ingredients

  • Pork Belly with Skin
  • 1 stick of Cinnamon
  • 3 Star Anise
  • 3 Ginger pieces
  • 2 Bay Leaves
  • About 2 spoonfuls of Dark Soy Sauce
@tjbrennan
tjbrennan / README.md
Last active August 29, 2015 14:15 — forked from milroc/README.md

d3.unconf example gist. Fork it here.

@tjbrennan
tjbrennan / setTimeoutSort.js
Created January 14, 2015 02:55
js sleepsort
var array = [4, 8, 1, 3, 2, 6, 2, 7, 20, 1, 6, 34, 3, 5, 0, 9];
function setTimeoutSort (array, spread) {
var sorted = [];
var i;
for (i = 0; i < array.length; i++) {
(function () {
var el = array[i];
setTimeout(function() {
// Long-polling chat server + client.
var chats = [];
require('http').createServer(function(req, res) {
if (/\/c/.test(req.url)) return res.end(chats.join('\n'));
var m = req.url.split('=');
if (m.length > 1) chats.unshift(m[1].replace(/\+/g, ' '));
res.end('<html><body><form><input name="m"></form><pre></pre><script>'
+ 'var r=new XMLHttpRequest;(function e(){r.open("GET","/c",true);r.send();r.onreadystatechange=function(){if(r.readyState==4){document.getElementsByTagName("pre")[0].innerHTML=r.responseText;setTimeout(e,1e3)}}})();document.forms[0].m.focus()'
+ '</script></body></html>')
}).listen(parseInt(process.env.PORT, 10)|| 3000);