Today, I bought the 13-inch Macbook Air with 2GB memory, 1.86 Core 2 Duo, and the 128 SSD. In Japan, on January 2nd, there are all kinds of special sales and I went to the Ginza Apple Store to pick up my new toy. I could have bought it on from the Apple web store and gotten 8400 yen off, but I also got an extra 5000 yen off at the Apple store. Unfortunately, I wanted to upgrade to 4GB memory, but they only had models with 4GB memory and the 256 SSD upgrade which would have made it way too expensive.
Until now, I have been using a 2008 Macbook 15 inch (non-unibody) with a 4GB ram upgrade. It would overheat when watching Flash video. Using the SMC fan utility on the new Air, it said that the temperature was about 80 C, which is about the same as the my old Macbook Pro. The big difference is that while my Macbook Pro is very hot to the touch, the Air only feels slightly warmer than usual.
Launching applications feels much faster on the Air, but other than that, the speed is about on par with my Macbook Pro. I have yet to try compiling and installing programs from the command line, but I heard those are really fast with an SSD. I also picked up a Grifin mini display port to HDMI adapter at the Apple store for $40 (probably paid too much, I know). I was worried it wouldn’t carry audio through the display port to my TV, but it worked after setting the sound output to tv in the system preferences.
I plan to use this as my main machine after moving a few more files and applications and try to sell my old macbook pro. Overall, I am really happy with the new Macbook Air after about 3 hours of use.
I like the new Macbook Air, but it doesn’t quite meet my needs. I am looking forward to the next iteration of the Macbook/Macbook Pro.
Here is a list of hardware I would like in order of importance:
- SSD standard, or the solid state stick like in the Air
- A second hard drive for storage. The SSD would hold the OS and applications and the hard drive would be for video, music, documents, etc. I wouldn’t really care if I lost the optical drive
- Core i3 standard with nvidia standard
- HDMI port. I hate the mini display port, I don’t want to buy another adapter, I have 3-4 that are now useless
- USB 3.0 (unlikely), firewire 400/800 (unlikely)
4.6.3 Re-indent Text
If you have code which has broken indent, you can select it and use Text → Indent Selection (without a selection it indents the current line).
The rules for estimating the indent are setup per-language using bundle preferences. For more details see theindentation rules section.
consider employee table(number,name,salary) to contain your data
1 ethan 900
1 ethan 900
2 sumakar 800
3 jay 800
4 jack 700
4 jack 700
4 jack 700
Follow the three steps below,
Step 1: Move the non duplicates to a temporary table
CREATE TABLE new_employee AS
SELECT * FROM employee WHERE 1 GROUP BY number,name,salary;
Step 2: delete old table
We no longer need the table with all the duplicate entries, so drop it!
DROP TABLE employee;
Step 3: rename the new_table to the name of the old_table
RENAME TABLE new_employee TO employee;
If your table has indexes, hold on a minute…;)
This worked like a charm. However I did it a sligthly different way, using Sequel Pro on Mac OSX:
1) Right-click the table on the sidebar and click “Duplicate Table”. Make sure that you check the box that says duplicate table. This could take a while with a large table, mine had about 67,000 rows.
2) Truncate the original table.
3) In the query window, use the query as stated above, but with an insert:
INSERT INTO table
SELECT * FROM tmp_table GROUP BY id, category
I have been using git for about a year. One of the differences between Git and Subversion is that Git does not require a server for you to use it because of its distributed nature. However, more times than not, you are working with a team of developers and you need to have access to a centralized server to push and pull from. The default method to setup git is through SSH.
Here is a short tutorial on setting up the server through SSH http://blog.commonthread.com/post/1034988660/setting-up-a-git-server
So now we have our git server up and running. Pretty simple, eh? But there is one big problem. There are many cases where you don’t trust the collaborators you are working with and now you have given them full access to the command line through SSH. They may not have root access but they would be able to create files in their home directory and possibly read files outside!
At this point, I wondered how Git hosting sites like GitHub or Codaset address this problem. Surely, they don’t have people accessing their servers using the SSH shell, right? So, I asked the question on stack overflow (http://stackoverflow.com/questions/3116508/securing-git-server), which has saved my butt more than a few times. It seems there is a shell that comes with Git that will only allow push and pull and won’t let them access the shell via SSH.
Setting the git user’s shell to /usr/bin/git-shell should do the trick. For instructions please see: http://www.kernel.org/pub/software/scm/git/docs/everyday.html
Note: Some people suggest the use of Gitosis or Gitolite. I haven’t tried either but as I understand it Gitosis allows you to setup teams and groups for more fine-grained control over which users access which repositories. For my purposes, using git-shell was the easiest and pretty secure, in my opinion.
Update (11/5/2010): This site pretty much sums it up http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git
That’s why Scott Skiles is one of the best coaches in the league.