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:
- https://developer.palm.com/content/api/dev-guide/tools/device-shell.html
- https://developer.palm.com/content/api/dev-guide/pdk/building-for-the-device.html
- http://www.webos-internals.org/wiki/PDK_on_Linux
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)
- ip address matching
- interval/segment tree
- 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):
- http://www.mikejablonski.org/2009/04/17/reading-shoutcast-metadata-from-a-stream/
- http://www.smackfu.com/stuff/programming/shoutcast.html
- http://code.google.com/p/audiostreamer-meta/source/browse/trunk/Classes/AudioStreamer.m
func:
- http://stackoverflow.com/questions/7290212/scan-itunes-library
- http://www.cocoadev.com/index.pl?CoreAudio
- http://proteusim.googlecode.com/svn/trunk/proteusx/QTSoundFilePlayer.m
- https://developer.apple.com/library/mac/#qa/qa1636/_index.html
- http://cpfaq.blogspot.com/2011/03/audio-ring-buffer-in-c.html
- http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/
UI goodness:
designs:
- http://www.premiumpixels.com/freebies/itunes-inspired-ui-kit-psd
- http://www.premiumpixels.com/freebies/music-player-skin-psd/
- http://www.premiumpixels.com/freebies/custom-audio-player-skin-psd/
- http://dribbble.com/shots/171064-Inspiration
- http://dribbble.com/shots/205118-iPod-UI
- http://dribbble.com/shots/272326-Music-Player-Final
- http://dribbble.com/shots/266325-Spotify-Mini-Player
- http://dribbble.com/shots/293350-Guardian-Angel
full-text search:
- http://sphinxsearch.com/blog/2010/08/17/how-sphinx-relevance-ranking-works/
- http://answers.oreilly.com/topic/2756-how-to-use-relevance-ranking-functions-with-sphinx/
- https://gist.github.com/389875
- http://tjholowaychuk.com/post/8265428421/reds-light-weight-full-text-search-for-nodejs-backed
- https://gist.github.com/923944
- http://blog.tty.nl/2011/10/07/a-basic-full-text-search-server-in-erlang/
- https://github.com/nateware/redis-textsearch/blob/master/lib/redis/text_search.rb
Apple app sandboxing
- http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/DesigningYourSandbox/DesigningYourSandbox.html#//apple_ref/doc/uid/TP40011183-CH4-SW1
- http://stackoverflow.com/questions/8029401/is-doing-a-command-like-defaults-write-com-blahblah-key-true-a-private-api
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
- http://stackoverflow.com/questions/6803843/mac-custom-nsslider-how-to-override-tick-mark-drawing-outside-slider-frame
- http://www.cocoabuilder.com/archive/cocoa/117307-nsslider-with-opacity.html
- https://bitbucket.org/bwalkin/bwtoolkit/src/590c12e68e7a/BWTexturedSlider.m
- https://bitbucket.org/bwalkin/bwtoolkit/src/590c12e68e7a/BWTransparentSliderCell.m
- http://stackoverflow.com/questions/7207945/custom-nsslidercell-knob-doesnt-follow-mouse-when-tracking
- http://www.cocoabuilder.com/archive/cocoa/163692-drawknob-in-nsslidercell-subclass.html
NSTableView
- http://www.cocoadev.com/index.pl?IconAndTextInTableCell
- http://stackoverflow.com/questions/5606796/draw-grid-lines-in-nstableview-only-for-populated-rows
- http://www.cocoabuilder.com/archive/cocoa/142820-setting-vertical-alignment-for-nstextfieldcell.html
- http://www.cocoabuilder.com/archive/cocoa/278995-what-the-right-way-to-make-the-last-or-only-table-column-fill-the-width-of-an-nstableview.html
- http://stackoverflow.com/questions/4803973/nstableview-rounded-corners
- http://www.cocoadev.com/index.pl?NSTableViewBezeledBorder
- http://katidev.com/blog/2008/02/22/styling-an-nstableview-dttah/
- http://www.cocoabuilder.com/archive/cocoa/203769-highlight-color-of-nstableview-row.html
- http://dumbified.wordpress.com/2010/11/16/custom-highlight-in-nstableview/
- http://www.cocoadev.com/index.pl?NSTableViewRollover
NSShadow
- http://stackoverflow.com/questions/4205662/draw-an-inset-nsshadow-and-inset-stroke
- http://www.cocoabuilder.com/archive/cocoa/215112-how-do-get-those-1-pixel-black-lines-into-my-app-window.html
- http://www.amateurinmotion.com/articles/2010/05/06/drawing-custom-nsbutton-in-cocoa.html
- http://www.cocoabuilder.com/archive/cocoa/133427-beveled-outline-around-view-bevelbox-how-to.html
NSTextField
NSWhatever
- http://developer.apple.com/library/mac/#samplecode/PhotoSearch/Listings/ImagePreviewCell_m.html#//apple_ref/doc/uid/DTS10003994-ImagePreviewCell_m-DontLinkElementID_11
- http://www.cocoadev.com/index.pl?RoundedRectangles
- http://stackoverflow.com/questions/1162414/how-do-i-manually-highlight-an-nspopupbuttoncell-when-drawing-it-draw-it-using
- http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaDrawingGuide/CocoaDrawingGuide.pdf
File formats
- http://marm.homepage.t-online.de/ - INI!
- http://wiki.xiph.org/JSPF_Draft
- http://www.xspf.org/xspf-v1.html
autocomplete/suggestions
- http://sujitpal.blogspot.com/2007/02/three-autocomplete-implementations.html
- http://cdnetworks-us-2.dl.sourceforge.net/project/suggesttree/SuggestTree.java
Launch
- http://news.ycombinator.com/item?id=3393408 - lifehacker traffic boost
- http://news.ycombinator.com/item?id=3434310 - quick SEO
Pilvy
- http://dispatch.io/ (cabinet, really)
iPhone, SMS
- http://hints.macworld.com/article.php?story=20090624022758268 - SMS history
- http://www.hackint0sh.org/f128/26994.htm - SMS SQLite db in later iOS
Lua
Embedding:
- http://richard.giliam.net/?p=78
- http://anti-alias.me/?page_id=31
- http://anti-alias.me/?p=36
- http://lua-users.org/wiki/SimpleLuaApiExample
etc.:
- http://nova-fusion.com/2011/06/30/lua-metatables-tutorial/
- http://www.gammon.com.au/forum/?id=6036
- http://www.kyne.com.au/~mark/software/lua-cjson-manual.html
Custom Protocol Handlers
inadequate:
- http://www.cocoadev.com/index.pl?SafariManPagePlugin
- http://www.bruji.com/bwana/ - hack, uses apple script to do a temp file and replace tab window, lame!
- http://www.cocoadev.com/index.pl?InputManager - too hacky, interesting vector tho
moz:
- https://developer.mozilla.org/en/Code_snippets/JS_XPCOM#XPCOMUtils_-_About_protocol_handler - starting point about:
NSURLProtocol:
- http://www.infinite-loop.dk/blog/2011/09/using-nsurlprotocol-for-injecting-test-data/
- http://lists.apple.com/archives/webkitsdk-dev/2004/Feb/msg00088.html
- http://www.mailinglistarchive.com/html/[email protected]/2007-09/msg00009.html - GOLDEN GEM right there on why it wasn’t working… gotta do it IN the safari/webkit process LOL.
so resort to DYLD_INSERT_LIBRARIES
for now.
Google Music API
- http://dpogue.ca/gmusic.html - unofficial, rev’d
- http://antimatter15.com/wp/2011/05/uploading-mp3s-to-google-music-beta-from-linux-chrome-os-win-and-mac/ - a journey
- http://music.google.com/music/play?u=0&songid=61a6c17b-7224-32f1-9099-fec0cebf608f&platform=ios
SSH
port forwarding mid-connection:
newline
~C
(shift C)
iPad kiosk mode
locking down ipad: