Skip to content

Instantly share code, notes, and snippets.

View bortels's full-sized avatar

Tom Bortels bortels

  • Simi Valley, CA, USA
View GitHub Profile
<link rel="import" href="../cool-clock/cool-clock.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@bortels
bortels / arraynotes
Created July 1, 2014 06:54
stuff I should have remembered from school
The below is ruby(ish) - but is really about matrix math
array.transpose flips array around diagonal axis (UL to LR):
a = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
a.transpose => [[1, 4, 7],
[2, 5, 8],
@bortels
bortels / README.md
Created July 1, 2014 23:58
Messing with infonodes

Inspired by http://bl.ocks.org - this is me trying to learn d3, especially regarding the interactive node stuff.

If you see me doing something bloody insane - don't pity me, or laugh, teach me the right way!

This started with a flat-out copy-paste of one of Mike's force-directed tree demos - http://bl.ocks.org/mbostock/1062288

No promises are made as to how functional it will be before I get distracted by bright lights and pretty colors.

@bortels
bortels / vmware_support_fail
Created July 7, 2014 19:20
vmware support
tbortels [12:03 PM]
Sigh. "For fastest results, use email" - ok, i prefer that. Go thru making request, fill out nice details, "Unable to Complete Your Request
The content is unavailable." boom
tbortels [12:04 PM]
so - I'm moving on to phone contact. grr
tbortels [12:09 PM]
I give up. vmware phone support is useless, unless someone can show me the "give me a live person" button.
@bortels
bortels / keybase.md
Last active August 29, 2015 14:04
keybase.md

Keybase proof

I hereby claim:

  • I am bortels on github.
  • I am bortels (https://keybase.io/bortels) on keybase.
  • I have a public key whose fingerprint is 6360 00D7 9A8E 8882 E5EE 296D 4740 D330 5224 5B90

To claim this, I am signing this object:

While doing wildly unrelated research, I came across the "AI Box Experiment" pages. After reading a bit, I was surprised to see ANY outcomes where the AI was let out; it seems fairly self-evident to me this should not happen. Because the conversations are private, I have not seen the arguments the AI player made - but while thinking about it, I suspect I can make a Gatekeeper argument that can counter them all - ie. I can argue to keep it in the box, and what the AI says is irrelevant.

Here is the argument, in the form of a "proof". I hesitate to use that term - it lack the rigor of a proper proof - but it is perhaps the framework or outline of a real proof, if you agree that the logic is basically sound. If you do not - I, personally, would appreciate reasonable, supported arguments about where it fails. I trust this community will not fall prey to the usual tropes of wishful thinking and so on. I would ask you follow each item, and only proceed if you agree; like any

@bortels
bortels / gist:d33bb54d2f98f9e5eb21
Last active August 29, 2015 14:22
Exposing a port on a running docker container

So - that was just complex enough that it might be nice to document and share it.

So - I am using docker and --link to expose a redis database to only the apps that use it. Which (as of now) is fine, so long as those apps are on the same host. But - I wanted to use the redis 'slaveof' command to quickly replicate the data to another redis running on a different host. Yes - I could grab the db from disk, scp, and restore. But it's handy to be able to quickly spawn a new copy elsewhere. I could not simply restart the original redis container exposing ports, because it is prod with people reading/writing to it.

So - The solution that works is: Run a new container, exposing the port you want, linked to the original container - and use socat to bridge the internal link to the external port.

@bortels
bortels / logstash.conf
Created June 15, 2015 21:54
logstash configuration for https://github.com/pblittle/docker-logstash including syslog listener
input {
stdin {
type => "stdin-type"
}
file {
type => "logstash"
path => [ "/var/log/logstash/logstash.log" ]
start_position => "beginning"
<!DOCTYPE html>
<meta charset="utf-8">
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
</head>
<body>
<div id="main">
</div>
</body>
@bortels
bortels / index.html
Last active September 18, 2015 06:36 — forked from jbeuckm/index.html
Hello, Three.js
<html>
<head>
<title>My first Three.js app</title>
<style>
body {
margin: 0;
}
canvas {
width: 100%;
height: 100%