Skip to content

Instantly share code, notes, and snippets.

@thoward
thoward / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@thoward
thoward / designer.html
Created February 24, 2015 22:27
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@thoward
thoward / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@thoward
thoward / LuceneDisposableExample.cs
Created November 12, 2010 00:57
An example workaround to add IDisposable support to objects that don't implement it (like Lucene.Net objects).
using System;
using Lucene.Net.Index;
namespace Lucene.Net.Extensions
{
public class Disposable<T> : IDisposable
{
public Disposable() { }
public Disposable(T entity, Action<T> disposeAction)
{
@thoward
thoward / index.html
Created November 20, 2012 01:30
SSI example
<html>
<body>
<h1>Party time!</h1>
<!--#include virtual="quote.html" -->
</body>
@thoward
thoward / equality_vs_bitwise_or.cs
Created January 28, 2013 01:13
This should be true for all values of x, y, z, and w (when comparing to zero anyway)
int x=0;
int y=0;
int z=0;
int w=0;
var bitwise_or = (x | y | z | w) == 0;
var equality = x == 0 && y == 0 && z == 0 && w == 0;
System.Diagnostics.Debug.Assert(bitwise_or == equality);
using System;
using System.Diagnostics;
using Mono.Simd;
namespace VectorizedQueryTest
{
class Program
{
static void Main(string[] args)
{
@thoward
thoward / jsig_methods.md
Created April 3, 2013 06:26
Description of method specification vs type specification... concept for jsig.

Example 1

Param array must implement method reduce, with arity of 2.

// !array => !reduce(_,_)
function reduce(array, reducer, seed) {
  return array.reduce(reducer, seed);
}
@thoward
thoward / output.txt
Created May 21, 2013 06:55
Explanation of my calculations about StrangeLoop economics, based on public information available in sponsorship prospectus/sponsor page/ticketing page/etc. Relevant Links: https://thestrangeloop.com/sponsors https://thestrangeloop.com/sponsors-page/prospectus
Total Sponsorship
70000
Total Ticket Sales
550000
Total Income
620000
Total Cost

Man-Eating-Cats

by Haruki Murakami
Translated by Philip Gabriel

Source

I bought a newspaper at the harbor and came across an article about an old woman who had been eaten by cats. She was seventy years old and lived alone in a small suburb of Athens -- a quiet sort of life, just her and her three cats in a small one-room apartment. One day, she suddenly keeled over face down on the sofa -- a heart attack, most likely. Nobody knew how long it had taken for her to die after she collapsed. The old woman didn't have any relatives or friends who visited her regularly, and it was a week before her body was discovered. The windows and door were closed, and the cats were trapped. There wasn't any food in the apartment. Granted, there was probably something in the fridge, but cats haven't evolved to the point where they can open refrigerators. On the verge of starvation, they were forced to devour their owner's flesh.

I read this articl