Mac Optimizations
Posted by Quinn Madson | Posted in | Posted on 10:59 AM
0
Switch off automatic graphic switching
Tune Mission Control
Fix disk permissions, reset System Management Controller, reset PRAM
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Download and install: Fuse for OS X (Make sure to check: MacFUSE Compatibility Layer)
Download and install: fuse-ext2
Open Terminal
Type: sudo nano -c /System/Library/Filesystems/fuse-ext2.fs/fuse-ext2.util
Press: [CONTROL W]
Type in: function mount [ENTER]
Arrow down to:
Change it to:OPTIONS="auto_xattr,defer_permissions"
OPTIONS="auto_xattr,defer_permissions,rw+"Press [CONTROL X]
I've been building a web app that analyzes data from an application called Ultimate Racer used to control the race track circuit for slot car racing. Ultimate Racer conveniently keeps all of it's data in a SQLite database.
However, getting the SQLite database to work with Railo was a little problematic so, I'm documenting the process here in the event that I need to do it again or someone else is googling how to make it happen.
First, you need the SQLite JDBC driver for Railo. I ran into a bunch of dead links so, I dropbox'd the file here: http://dl.dropbox.com/u/472577/sqlite-jdbc-3.7.2.jar
Place the JAR in your Railo installation under: /PATH/TO/RAILO/lib/ext/sqlite-jdbc-3.7.2.jar
Restart Railo after copying the driver. Go into the Railo Web Administrator and go to "Datasource".
Put in the name of your datasource, for type select Other - JDBC, and click Create.
| I drilled a small hole on the left side to allow wires into the enclosure. |
| I noted the wires so that if pulled, the solder joints won't be stressed. |
| I ran the new line-out red line into the existing solder joint for the onboard speaker. |
| I desoldered the black line to the onboard speaker. I made a joint between the new line-out black line, the speaker black line, and a new jumper. |
| All soldered together and bit of heat shrink. |
| Connected the switch (momentary - normally off) to the original speaker black line solder joint and to the jumper from above. |
This here is just a space for holding my Titanium Studio customizations to extend or overwrite the provided ruble for snippets. Feel free to use them and let me know if you have any additions that help you code faster.
snippet 'inspectObject' do |s|
s.trigger = "inspect"
s.expansion =
'Ti.API.info("Inspecting Object: " + ${1:myObject});
for (var thing in ${1:myObject}) {
Ti.API.info("${1:myObject}." + thing + " = " + ${1:myObject}[thing]);
}'
end
snippet 'Ti.API.info qk' do |s|
s.trigger = 'dump'
s.expansion = 'Ti.API.info(\'[qk]:${1:variableName}\ = \' + ${1:variableName});'
end
snippet 'Alloy On Event' do |s|
s.trigger = 'on'
s.expansion =
'${1:myObject}.on("${2:click}", function(e){
});'
end
snippet 'Ti.API.info' do |s|
s.trigger = 'info'
s.expansion = 'Ti.API.info("${0:log}");'
end
I was trying to get a Titanium app up and running with a Usergrid backend and I kept getting the error:
[INFO] {"error":"web_application","timestamp":1344133939838,"duration":0,"exception":"javax.ws.rs.WebApplicationException"}
var xhr = Ti.Network.createHTTPClient();
xhr.open("POST", "https://api.usergrid.com/YOUR_ORG-NAME/YOUR-APP-NAME/users");
xhr.setRequestHeader('Content-Type','application/json');
xhr.onload = function(){
try {
Ti.API.info(this.responseText);
} catch(e) {
Ti.API.info(e);
}
};
var data = {
username: "raoul.duke",
email: "raoul.duke@doomed.net",
name: "Raoul Duke",
password: "b4tc0untry!!"
};
xhr.send(JSON.stringify(data)); //this is the important bit
© All Rights Reserved. Nerd Alert