Random Code

Everything on this page is inaccurate, full of lies, and should be ignored. In fact, you shouldn’t even be looking at this page. I’ll make separate posts are discoveries are made.

HTTP

Palm/HP Veer 4G - Cross-Compiling to ARM

Basics:

LuaJIT:

make -j amalg  HOST_CC="gcc -m32" CROSS=/opt/PalmPDK/arm-gcc/bin/arm-none-linux-gnueabi- TARGET=arm TARGET_SYS=Linux TARGET_FLAGS="--sysroot /opt/PalmPDK/arm-gcc/sysroot"

node.js:

#!/bin/sh

export TOOL_PREFIX=/opt/PalmPDK/arm-gcc/bin/arm-none-linux-gnueabi
export CXX=$TOOL_PREFIX-g++
export AR=$TOOL_PREFIX-ar
export RANLIB=$TOOL_PREFIX-ranlib
export CC=$TOOL_PREFIX-gcc
export LD=$TOOL_PREFIX-ld

export CCFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp"
export ARM_TARGET_LIB=/opt/codesourcery/arm-2009q1/arm-none-linux-gnueabi/libc

make clean
./configure --without-ssl --dest-cpu=arm && make

First, grab a stable release of V8:

svn checkout http://v8.googlecode.com/svn/tags/3.8.8 v8-3.8.8
cd v8-3.8.8

Then use the GYP build system (not the old SCons-based one) to build a release version for ARM:

make dependencies
GYP_GENERATORS=make make arm

// TODO: fix compile errors

hostname globbing (wildcard matching for whitelists)

http://stackoverflow.com/questions/8622816/redis-or-mongo-for-determining-if-a-number-falls-within-ranges

  • ip address matching
  • interval/segment tree

http://stackoverflow.com/questions/4038885/how-to-design-a-string-matching-algorithm-where-the-input-is-the-exact-string-an

  • string matching for wildcards

http://code.google.com/p/redis/issues/detail?id=110

  • advice from antirez about doing it with a sorted set and string radix hackery

Bluetooth

music player

ICY streaming (shoutcast, icecast):

func:

UI goodness:

designs:

full-text search:

Apple app sandboxing

Streaming

HE-AAC: http://cocoawithlove.com/2010/03/streaming-mp3aac-audio-again.html

YouTube over mobile RTSP: http://everburning.com/news/mytube-from-the-ground-up/

YT search query: http://gdata.youtube.com/feeds/api/videos?alt=json&max-results=10&q=lomo+saltado

custom NSSlider

NSTableView

NSShadow

NSTextField

NSWhatever

File formats

autocomplete/suggestions

Launch

Pilvy

iPhone, SMS

Lua

Embedding:

etc.:

Custom Protocol Handlers

inadequate:

moz:

NSURLProtocol:

so resort to DYLD_INSERT_LIBRARIES for now.

Google Music API

SSH

port forwarding mid-connection:

  1. newline
  2. ~C (shift C)

iPad kiosk mode

locking down ipad: