27.8.08

moving

Now at jayridgeway.com

I moved because tumblr.com is faster and the developers are friendly.

27.6.08

droopy shroom

mosrite is all right

5.6.08

more shrooms

2.6.08

Yawn



Check out the completely boring text to image converter. Whoopee!

30.5.08

strange shroom indeed

20.3.08

tinyurl php function


function tinyurl($url){
return(trim(file_get_contents('http://tinyurl.com/api-create.php?url='.$url)));
}

16.1.08

Snap: screen capture to clipboard for OS X

Snap is a simple app for OS X that takes a screen capture and copies to the clipboard. The space bar toggles between window and user modes.

Copy snap to your applications folder. I suggest dragging to your dock.

Hyperlink to snap.dmg

For those that love the terminal. Here is the magic:

% screencapture -x -i -c

19.12.07

tissue art

26.10.07

15.10.07

robots love the mesmers

31.7.07

Super secret decoder ring... in php



It's time for a wee bit of code. The following is a simple php class to encrypt/decrypt strings. This is useful when you need to pass around secret documents but are out of microfiche and fake lipstick tubes.

To use:


<?php
require_once('secretdecoderring.php');

$dr = new SecretDecoderRing();
$enc = $dr->encode($argv[1]);
$dec = $dr->decode($enc);
var_dump($argv[1]);
var_dump($enc);
var_dump($dec);
?>




<?php

class SecretDecoderRing
{
private $key = "supersecret";
private $td;

function __construct()
{
$this->td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($this->td), MCRYPT_RAND);
mcrypt_generic_init($this->td, $this->key, $iv);
}

function __deconstruct()
{
mcrypt_generic_deinit($this->td);
mcrypt_module_close($this->td);
}

function encode($string)
{
$enc = mcrypt_generic($this->td, $string);
return base64_encode($enc);
}

function decode($string)
{
$enc = base64_decode($string);
$dec = mdecrypt_generic($this->td, $enc);
// It's padded. Really. Security is such a waste of time.
return rtrim($dec, ((ord(substr($dec, strlen($dec)-1, 1)) >= 0 and ord(substr($dec, strlen($dec)-1, 1)) <= 16) ? c
hr(ord(substr($dec, strlen($dec)-1, 1))): null));
}
}

?>

24.7.07

a flower?

23.7.07

OS X terminal settings for tcsh

Everyone seems to love two features of my OS X environment. Color terminals, and an updating title bar that even works when you ssh. Rock.

Put the following in your .cshrc or .tcshrc file in your home directory.


#
# Terminal stuff
#
setenv TERM "xterm-color"
setenv CLICOLOR "true"
setenv LSCOLORS "exfxcxdxbxegedabagacad"

#
# Auto complete
#

set fignore = (.o \~)
set complete = enhance

#
# Title bar
#
setenv SHORTHOST `echo -n $HOST | sed -e 's%\..*%%'`
alias precmd 'printf "\033]0;%s @ $SHORTHOST\007" "${cwd}" | sed -e "s%$HOME%~%"'
sched +0:00 alias postcmd 'printf "\033]0;%s @ $SHORTHOST\007" "\!#"'

29.6.07

jim davidson and giant crab

18.6.07

16.5.07

George Bush is a what?



This is video of new friend in Kiev. He is expressing his view of our current administration. I'm not sure where he learned English. :)


Digg!

30.4.07

togo.ebay.com is to interweb as Webster is to...



Ebay is the latest to board the widget band wagon. I think this is a smart move. I mean people love small things right... remember Webster?

slimy liquid marketing

I've spent the last decade listening to the phrase "viral marketing". It seems to be the basis of every tech company business plan and when it works it can make even piece of shit sites like MySpace popular. So, I was sitting in on a marketing meeting today and decided to research the word "viral". The Latin is literally translated to "slimy liquid"... nice.

Therefore, I resolve to called viral marketing "slimy liquid marketing" from this day forward.

hot.

27.4.07

lolling chair by thomas moser


Thomas Moser had a sale today so I stopped by on my lunch break. For those not familiar with TM, they have an interesting approach to furniture making. They have really great supplies of wood - especially cherry - and everything is hand assembled. However, all furniture is made in a high tech facility in Maine with big milling machines. This is very close to hand crafted but with a much lower price tag (lower != cheap). So... make sure you hand select what you buy to make sure the grain works with lines of the piece.