when wanting to make calls for Cocoa on OS X platform
consider the Objective C calls first make it work with Objective C and Xcode first
once it is working there, it should be easy to wrap those calls with something like PyObjC... but until then, that might just get in the way. Need to define what it is that you want to do first.
learning Cocoa:
This is the main introduction to Cocoa: | http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002974
It recommends knowing about the Mac OS X Technologies, described in the following document: | http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/OSX_Technology_Overview/About/About.html#//apple_ref/doc/uid/TP40001067-CH204-TPXREF101
In particular, the following section on Graphics and Multimedia Technologies seems relevant: | http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/OSX_Technology_Overview/GraphicsTechnologies/GraphicsTechnologies.html#//apple_ref/doc/uid/TP40001067-CH273-SW1 | Talking about Quartz, the 2D rendering engine for window layouts.
define (plugin to define words)
error installing toolbar:[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://global/content/bindings/toolbar.xml Line: 301"]
I try to keep my firefox configuration as simple as possible.
Change the home page
There are a few items that are great additions though:
Add-ons (plugins):
CopyAllUrls Firebug Down them all! ColorZilla Forecastfox Weather (no link to 5 day, no link to hourly, no separators, move to left of firebug)
Javascript Debugger: https://addons.mozilla.org/en-US/firefox/addon/216/
#If installing flash (a machine with adequate power), #this addon is also a good one: Video DownloadHelper
Flash
Trying: AdBlock Plus FireFTP AniWeather (if not, try weather bug) Feedly
Venkman (javascript debugger) Rainbow (color picker)
unmount any drives that are attached. unplug cables
sudo easy_install mako not working at the moment dev.pocoo.org not responding sudo easy_install -f . pygments sudo easy_install jinja2
Once you have a fresh instance of Ubuntu running, it is time to install a few critical applications.
It is best to perform the following steps on a live instance, just incase you install something you didn't mean to.
#Location of your local Context instance: export USBPATH=/c export VERSION=10.04 export ARCHIVEPATH=$USBPATH/downloads/ubuntu/$VERSION sudo mkdir -p $ARCHIVEPATH cd $ARCHIVEPATH
#If this is a new version, backup previous startup notes: cp $USBPATH/technical/system/ubuntu.txt $USBPATH/technical/system/ubuntu-$PREVIOUS.txt #create a new directory for archives: mkdir $USBPATH/downloads/ubuntu/$VERSION #start with a fresh copy of sources.list (will update later) #cp /etc/apt/sources.list $USBPATH/downloads/ubuntu/$VERSION/sources.list
#be sure to clean up any updates that have already been downloaded previously ls /var/cache/apt/archives/ mkdir updates/var/cache/apt/archives/ sudo mv /var/cache/apt/archives/*.deb updates/
sudo apt-get update
sudo apt-get install -y -d python2.6-dev python-imaging python-docutils python-numpy python-pip python-setuptools #python-setuptools (for easy_install? now using pip?) #for pyaudio (should already have installed) #sudo apt-get install -y -d libportaudio2 python-support
mkdir python sudo mv /var/cache/apt/archives/*.deb python/
#emacs-goodies-el is only available with standard emacs #this is a good chance to see if standard emacs renders better on latest ubuntu sudo apt-get install -y -d emacs emacs-goodies-el mkdir emacs sudo mv /var/cache/apt/archives/*.deb emacs
sudo apt-get install -y -d jhead libid3tag0 libjpeg-progs libmad0 libmad0-dev libungif4g tofrodos mkdir libraries sudo mv /var/cache/apt/archives/*.deb libraries
#2009.04.05 15:35:38 now available directly via apt-get sudo apt-get install -y -d gnome-do mkdir gnome-do sudo mv /var/cache/apt/archives/*.deb gnome-do/
#if not done earlier, #get base system updates #installing these may eat up memory on a live system #sudo apt-get upgrade -y -d #mkdir updates2 #sudo mv /var/cache/apt/archives/*.deb updates2/
#don't forget mozilla configs... either from scratch: #see firefox.txt then copy for future installs: cp -r ~/.mozilla . #cp -r /home/user/.mozilla . #or copy previous: #cp -r ../9.04/.mozilla .
#This downloads everything for local/later use. #To perform the actual installation, see startup.sh
/c/technical/system/upgrade.txt /c/scripts/system/ubuntu-personal.txt /c/technical/system/ubuntu.txt /c/technical/system/shutdown.txt
upgrading a system,
should follow all instructions in shutdown.txt (up to actually turning computer off)
Binary data should be elsewhere. If not, export that now. ls /c/binaries-local ls /c/out-backups
move personal data to a separate location
be sure that all personal data and settings are backed up. Settings should be backed up in the form of notes and install procedures. Once a structure is in place that is used, everything should be in that structure, and nothing unnecessary should be in it.
(currently under /c)
export outgoing items. (might not get back to the same os before end of month) python /c/moments/moments/scripts/export_logs.py /c/outgoing/ /media/CHARLES/outgoing/ or python c:cmomentsmomentsscriptsexport_logs.py c:coutgoingd:outgoing
if possible, sync mercurial /c/scripts/mercurial_sync.py or use TortoiseHG on windows (should have minimal repositories there)
(following does not work currently: [2010.08.26 10:57:14] c:cscriptsmercurial_sync.py c:c d:
(also client repositories)
on posix systems note uptime make new entry for that.
if on linux with multiple workspaces, note which workspaces are open in a new instances entry [now] instances [system] 1: 2: 3: 4: 5: 6: 7: [etc]
essentially customize toolbar to liking manually (drag and drop items) then edit a new file as follows:
~/.mozilla/firefox/xxxxxxxx.default/chrome/userChrome.css
/* remove new tab button next to last tab */ .tabs-newtab-button {display: none !important}
/* remove magnifying glass from search box */ .search-go-button { display: none !important}
/* combine stop and reload buttons */ #stop-button[disabled] { display: none } #stop-button:not([disabled]) + #reload-button { display: none }
/* don't show back or forward buttons if there's nothing to go back or forward to */ #back-button[disabled="true"] { display: none } #forward-button[disabled="true"] { display: none }
see also | http://superuser.com/questions/44031/recommended-firefox-theme-for-a-netbook
add a link to a local copy of python documentation
https://addons.mozilla.org/en-US/firefox/ Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/collections/popular?show=7&page=2 Collections :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/934/ CopyAllURLs :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/1843/?collection_uuid=da0ecd99-2289-7ab0-7d57-e7c489c845c3 Firebug :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/201/?collection_uuid=772c5082-2a86-cb22-38b9-259fb9edaf04 DownThemAll! :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/271/?collection_uuid=da0ecd99-2289-7ab0-7d57-e7c489c845c3 ColorZilla :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/1865/?collection_uuid=772c5082-2a86-cb22-38b9-259fb9edaf04 Adblock Plus :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/684/?collection_uuid=da0ecd99-2289-7ab0-7d57-e7c489c845c3 FireFTP :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/8538/ Feedly :: Add-ons for Firefox https://addons.mozilla.org/en-US/firefox/addon/398/ Forecastfox :: Add-ons for Firefox
https://addons.mozilla.org/en-US/firefox/addon/12331/?collection_uuid=c867f4e3-1031-72c6-d68a-6d8593691b6b AniWeather :: Add-ons for Firefox
do this after libjpeg install | http://biomunky.wordpress.com/2010/04/19/pil-10-6-using-pip/
sudo easy_install pip
then
sudo pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz
can test and verify installation with: cd /c/scripts python image_resize.py notice_world.jpg 100
automatically start Terminal and Emacs
mercurial is usually installed earlier in the process... it is needed before other python libraries make sure you have it, and if not, install it now
also [2009.06.22 09:08:16] notes for this are elsewhere but this is also a good time to install mercurial easy_install mercurial
on Mac OS X this does require Xcode to be up to date (can still download an executable for mac)
cd /c/downloads/python/ hg clone https://pyglet.googlecode.com/hg/ pyglet cd pyglet hg update cocoa-port sudo python setup.py develop (or install)
add radio stations at the very least
get any packages that are not included for Python: /c/technical/system/python-install.txt
rearrange notes if anything would have made it easier to edit these instructions on your new system sooner.
install moments
hg clone http://bitbucket.org/cbrandt/moments /c/moments #or use a local copy #hg clone /Volumes/CONTEXT/moments /c/moments
cd ln -s /c/moments/editors/emacs/.emacs .emacs ln -s /c/moments/editors/emacs/.emacs.d .emacs.d ln -s /c/moments/editors/vi/.exrc .exrc
mkdir /c/outgoing
open up your text editor
make a common directory for all User Accounts to use for shared information on the system. I like to use /c :
sudo mkdir /c cd /c sudo chmod 777 .
create new clones of any personal mercurial repositories. hg clone /media/CONTEXT/technical /c/technical
cd cp /c/technical/.bashrc .bash_profile
change location for weather on dashboard
Breathe. :)
Download the main applications you need. This is a good chance to get updated versions of everything
Make sure wireless network is enabled and connected. Register your computer if your network requires it.
Change Desktop Background (Ctl-Click on desktop for option) For Default I prefer Solid Gray Dark... can always customize later in other instances.
For Create Your Account: Start with Default.
If you plan to create other accounts later, consider starting with a Default account. This account will then be used to propagate changes, but this prevents missing even those little tweaks that you make when first getting started. (might not make notes of them, or might forget to do them a second time).
It is a good idea to avoid distractions when setting this up... save those for the other accounts.
Go through and answer the standard questions for Setup. These should be self explanatory.
reboot. jump. jump. jump.
phowa. release consciousness to buddha mind.
if multiple sessions open, for each user logged in:
be sure to go through and note emacs at the very least (see above)
it is also a good habit to close down firefox... saving any links in their right location and closing windows/tabs that don't need to be restored next time
pkill -9 firefox /c/scripts/mercurial_sync.py or use TortoiseHG on windows (should have minimal repositories there)
(following does not work currently: [2010.08.26 10:57:14] c:cscriptsmercurial_sync.py c:c d:
(also client repositories)
I can never find an easy way to do this on the rare occasions that I need to do this. maybe I can rediscover the different ways and keep track of them here.
Open Sound Preferences uncheck play user interface sound effects turn down alert volume
these notes are formalized in: startup-python.sh
System Preferences -> Dock Automatically hide and show the Dock (once you have quicksilver, the dock isn't as helpful)
update to the latest xcode this provides compilers. | http://developer.apple.com/technology/Xcode.html
also [2009.12.15 16:01:14] xcode 3.2.1 only works with 10.6 3.1.4 is the last one that works with leopard 10.5 also [2009.12.15 16:53:36] Note that Xcode lives in: /Developer/Applications/Xcode (not in main Applications directory)
enable spaces (grouped with expose) 2 spaces Firfox, Thunderbird, iTunes on second one Emacs and Terminal on first one
Change "To switch between spaces:" to be Option - Arrow Keys Control Arrow Keys are used in Emacs
be sure to set up easy_install for the new python instance this can be done by running ez_setup.py available at: | http://peak.telecommunity.com/dist/ez_setup.py
curl http://peak.telecommunity.com/dist/ez_setup.py > ez_setup.py
#curl http://www.ijg.org/files/jpegsrc.v6b.tar.gz > /tmp/libjpeg.tar.gz curl http://www.ijg.org/files/jpegsrc.v8a.tar.gz > /tmp/libjpeg.tar.gz
tar -xzvf /tmp/libjpeg.tar.gz cd jpeg-8a ./configure
sudo make install
cd ../ sudo rm -rf jpeg-8a
download and move prebuilt binary for osx to /usr/local/bin sudo mv ~/Desktop/jhead /usr/local/bin sudo chmod +x /usr/local/bin/jhead
open office works native on OS X as of version 3 so far seems like it should be equivalent to NeoOffice | http://download.openoffice.org/
create a link from /Volumes to /media to be more compatible with linux scripts: sudo ln -s /Volumes /media
nosetests | http://somethingaboutorange.com/mrl/projects/nose/ | sudo easy_install nose
be sure to clear history of firefox (shell too?) mv ~/Desktop/* /downloads/macosx/
create other accounts through OS.
sudo python /c/scripts/system/macosx-push_default.py does the following:
script to propigate changes from default account out to other accounts should just cycle through accounts and do following:
#prep sudo sudo ls
cd /Users export NAME=project export DATE=20100325 sudo mv $NAME/ $NAME-$DATE sudo rsync -av default/ $NAME sudo chown -R $NAME: $NAME
sudo mkdir originals sudo mv 2009 originals
#2009.02.07 16:41:31 admin@one:/Users #2009.02.04 19:21:08 charles@one:/Users #2009.02.04 19:22:06 charles@one:/Users #2009.02.04 19:20:50 charles@one:/Users
this will ensure that any data that wants to be kept gets moved into right Context should probably be run from default profile only
also [2009.02.05 12:01:52] rsync preserves links, unlike copy
change settings in Terminal Use Pro, make it Default, and then make sure Pro is used for: On startup, open: New window with settings: Pro
Making the profile Default will ensure that it applies to new tabs as well.
Set good place for first few terminals to open (where emacs lines up)
also [2010.04.19 15:52:25] open two terminals Window->Save Windows as Group default window group select "use window group when Terminal starts"
In Finder, if not using iDisk, remove it from DEVICES list (drag it off of list to remove)
move any downloaded files to your new Context cd mkdir -p /c/downloads/macosx ls ~/Desktop ls ~/Downloads mv ~/Downloads/* /c/downloads/macosx/
and backup to USB for future use: rsync -av /c/downloads $USBPATH/downloads/
apply any other personal settings to your system
consider making a default account with what you've done for here, and propagating that to other accounts.
download emacs install emacs
download quicksilver install it add it to Account Preferences->Login Items also add quicksilver launcher to the Dock
Plugins: Firefox, Terminal, etc. set Quicksilver key to Option-Space
-download latest firefox (mozilla.org) | http://www.mozilla.com/en-US/
See firefox.txt for configuration notes
Open System Preferences in Date & Time: enable Set date & time automatically choose timezone use 24-hour clock
System Preferences -> Accounts: Click the lock to make changes. Login Options Automatic Login: Disabled Show fast user switching menu as: Icon
also [2009.06.21 10:57:11] Disable guest account
Check for software updates this can take a while to download
System Preferences -> Sharing change machine name
It's that time again. Maybe you have a brand new computer (yay!), or maybe it's just time to do some spring cleaning. Either way...
Start with a fresh install of the operating system.
If this is a system with an existing and used operating system in place, I prefer to wipe the drive completely for that "fresh install" feeling. Having install move the previously installed system to "Previous Systems" does not clean everything up. If you want to keep it around, it is better to move it to an archive drive of sorts. Do that now if you haven't already.
optionally, if online, check for software updates to your operating system sometimes these are the actual trigger for a restart (shutdown) also [2009.12.10 11:46:02] if updates are taking too long, can restart then check for updates before launching again.
If you are on a shared system, Virtual Env may help isolate your Python instance from other Python instances on the system.
The other component that you will need to install is the Python Imaging Library (often abbreviated as PIL).
Binaries for windows are available at the main site. Binary packages are much easier to install than from source.
For Mac OS X you can use ports, or find a binary package like the following: | http://pythonmac.org/packages/py25-fat/index.html | This also requires the 2.5 version of Python from python.org. (The one distributed with Leopard won't work)
also [2009.06.26 13:19:06] after installing the python from python.org, make sure that the python in the default path is using the latest python which python python -V should be 2.5.4
sudo rm /usr/bin/python sudo ln -s /usr/local/bin/python /usr/bin/python
sudo rm /usr/bin/pythonw sudo ln -s /usr/local/bin/pythonw /usr/bin/pythonw
See also: | http://code.google.com/appengine/docs/python/images/installingPIL.html
Python is included with many operating systems.
An easy way to check if your system already has Python is to open up a terminal / command prompt and type:
python -V
for example: python -V Python 2.5.2
If your operating system does not have Python installed, please visit: | http://www.python.org | For more information on downloading and installing Python for your system.
if you're in emacs with journal installed:
open up the file called instances.txt make a new entry describe the system state (keywords describing what you're doing with the files that are open) press M-x jp (journal print files) save it close emacs (repeat for any other emacs open)
could optionally install flash cd $DLPATH/ubuntu/install_flash_player_9_linux/ ./flashplayer-installer