Wednesday, March 4, 2015

Ionic Route TemplateUrl Not Found Issue

Note that both of the following are working in browser & simulator, even run directly on the phone is good. However, when you package the app and install it on your phone, the template file will not be found.

This is a tricky one because when the app installed on the phone, unlike web deployment, it most likely is not installed at root of your phone, thus, it cannot find the file.

To solve this, just trying to avoid starting with '/' in your url mapping.

CORRECT

app.config(function($stateProvider, $urlRouterProvider) {

  $stateProvider
  .state('home', {
    url: '/home',
    templateUrl: 'template/list.html'
  });

  $urlRouterProvider.otherwise("/home");
});

WRONG

app.config(function($stateProvider, $urlRouterProvider) {

  $stateProvider
  .state('home', {
    url: '/home',
    templateUrl: '/template/list.html'
  });

  $urlRouterProvider.otherwise("/home");
});




Wednesday, February 11, 2015

[Mac OS] [Android SDK] [Ionic] [How to Fix] ionic platform add android - ANDROID_HOME is not set and "android" command not in your PATH.

  1. Download Android SDK & Unzip it
  2. Setup Environment Path
    • Open terminal, run 'vi ~/.bash_profile'
    • Add the following lines in that file
      • export ANDROID_HOME=/Users/Ian/Documents/Dev/android-sdk-macosx
      • export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    • Save & Exit
    • Run 'source ~/.bash_profile'
  3. Make sure you have the write permission for the sdk folder.
    • Run 'chmod -R 777 <Your sdk path> 
      • (e.g. chmod -R 777 /Users/xxx/Development/android_sdk_mac).
    • This is really important. I have spent a lot of time figuring this out. If you don't have the write permission, ionic will always throw 'ANDROID_HOME is not set and "android" command not in your PATH' error even if you have correctly set up all the environment variables and path.

Wednesday, May 28, 2014

那些你爱过的人,总会在平行时空,爱着你

1.
小白兔有一家糖果铺,小老虎有一个冰淇淋机。兔妈妈告诉小白兔,如果你喜欢一个人呐,就给一颗糖他。小白兔喜欢上了小老虎,那么那么喜欢,忍不住就把整个店子送给了他。回家后兔妈妈问她,那小老虎喜欢你吗。小白兔直点头,妈妈说,那他为什么不给你吃个冰淇淋呢。


2.
小白兔说,他是要给我来着,我说我不爱吃。兔妈妈说,那你真的不爱吃吗,有七种口味呢,巧克力味道的里面还有你最爱吃的杏仁啊。小白兔用脚划拉着地板,喃喃的说,其实我也没吃过,只是就想着把糖给他了。


3.
小老虎有了糖果店,小白兔说不如我帮你把冰淇淋机推到公园去卖吧。夏天可真热啊,冰淇淋每天都卖得光光的,大家都夸小白兔好聪明。小白兔呢,还是一口也舍不得吃。她就想等小老虎亲手送她一个,小白兔自己也没发现,她最爱的口味已经换成了香草,想要的也不再只是冰淇淋了。


4.
时间一天天过去了,小白兔还是没有吃到冰淇淋。倒是隔壁摊子卖饼干的小熊,给了她一盒小兔子造型的曲奇。小白兔留下糖果店和冰淇淋机给了小老虎,跟小熊去了更远的小公园卖饼干。兔妈妈问她,你不是不喜欢吃饼干吗,怎么又收下了呢。小兔子揉着红红的眼睛说,我就是饿了。


5.
后来小兔子听说,小老虎把冰淇淋机送给了小企鹅,和她一起住在了糖果店里。小熊把这些告诉小兔子的时候,她耷拉着耳朵呆了很久。小熊开玩笑的问她,你是不是后悔没有吃个冰淇淋再走呀。小白兔愣愣的转过脸说,就是有点难受,没能留些糖给你。


6.
小兔子卖力的帮着小熊卖饼干,没多久就又攒了一笔积蓄,买了新的糖果铺。这次兔妈妈千叮咛万嘱咐,她说宝宝啊,这糖要慢慢的给,不然后来就不甜了。小兔子 嘴上连连答应,心里却想着小熊收到糖果店该多开心啊。她只知道小熊又加班去了,不知道他小鸭子形状的饼干马上就要烤好了。


7.
小兔子回家看到了偷偷藏起来的小鸭子饼干,什么也没有多问,只是跑回家跟妈妈大哭了一场。她呜咽着和兔妈妈说,小熊最喜欢吃糖了,我终于可以给他糖果屋了,他为什么要离开我呢。兔妈妈笑了,她摸摸小兔子的头说,当他不爱你了,你的糖就不甜了。


8.
小兔子还是想不通,只好带着糖果店搬去了更远的地方。小鸭子可不是什么善茬儿,她不知从哪里打听到了糖果店的事。一天饭后,她揶揄的告诉小熊,哎呀你可不知道吧,你心里最单纯的小白兔,背着你用卖饼干的钱给自己买了好东西呢。不久之后,小兔子就收到了小熊的来信。


9.
信里只有短短几句话,大致是说小兔子走后饼干铺子生意一直不好,钱怎么说也是卖饼干挣来的,希望小兔子能把糖果店还给他。小兔子看完信后眼睛哭成了桃子, 她想起了妈妈的话,把店给了小熊。兔妈妈说小兔子是韭菜馅的脑子勾过芡的心啊,她说妈妈,其实糖还是甜的,只是人生太苦了。


10.
后来小白兔又爱过几个人,都无疾而终了。这缺心眼的小兔子啊,喜欢上一个人,就会使劲对他好,恨不得掏心掏肺给他看。她以为只有这样,才能让爱情活得更久更久一些。可惜那时候的小兔子还不明白,其实任何东西啊只要够深,都是一把刀。


11.
有一天小兔子出门,发现小熊醉倒在她门口。他哭着碎碎念着,说他过的不开心,说糖果店已经被吃完了,小鸭子嫌他没本事拍拍屁股就走了。 他一把抱住小兔子说,如果说着世界上我还有什么值得得回忆的,大概也只有你了。 小兔子被勒的喘不过气来,他心里想着,也许爱上一个旧人,就不会再有新的问题了吧。



12.
很久很久以后,小兔子和别人讲起这段故事,总是感慨万分的说,那些值得回忆的事啊,就该永远放在回忆里。



13.
不知道你又没有玩过一种游戏机,投硬币的那种。有好多小爪子推啊推,硬币们互相推搡着,摇摇欲坠却又固若金汤。拟投入的越多就越难收手,机器里的硬币落得越厚重就越不会有收获,可越是不掉币你就越觉得大奖就要来了。这逻辑很有趣,它只在你输的时候成立。可小兔子就是这么觉得的,她在万丈悬崖边,以为跳下去是学会飞翔的捷径。她默默地想,大奖终于要来了。她被大把硬币即将掉落的景象迷红了眼,以至于忘记了,自己没有翅膀。



14.
既然是童话,总得有点好的不是。小兔子回到了小熊身边,日子没有想象中的糟糕。一起吃饭,逛逛公园,小熊每天都采一朵最漂亮的花回来送给她,小兔子会做一手好菜,小熊总是抢着洗完。小熊以为一切都好了,他甚至点点失望,都说感情是刻骨铭心的,可小兔子似乎没留下任何伤痕。多可笑啊,那些拿刀子去花豆腐的人,永远都不知道疼。



15.
直到有一天晚上,小熊从厨房出来,随手递了一块饼干给小兔子。小兔子摇摇头,说我好久不吃饼干了。然后她抬起头看着小熊,淡淡的说,你给过别人的东西,就不要再给我了。小熊一瞬间明白,这些伤口还是血淋淋的。那年小兔子扑在妈妈怀里哭得那个下午,他就已经弄丢他的小兔子了。一起弄丢的,还有原本可以幸福的可能。



16.
可小熊舍不得小兔子,小兔子自己也没发现自己当初的喜欢,已经只剩下不甘心。日子还在继续,小兔子除了还是不吃饼干,什么都是百依百顺的。在别人眼里,他们俨然成为了恩爱的一对儿。直到有一天,他打开一只旧箱子,里面装满了小熊每天送她的花。花都枯萎了,小兔子想起这些日子,她每天接过小熊的花都是敷衍的笑笑,转身便扔进这个破箱子里。她一下子发现,原来不爱了,是早就不爱了。



17.
和小熊分手后,小兔子断断续续的又开过几个糖果店,卖的卖送的送,也所剩无几了。可她还是学不会开口,说她饿,说她想要吃个带杏仁儿的冰淇淋。她把给糖果当成了一种惯性和礼节,看起来和从前没什么差别。她还给它们报了亮晶晶的糖纸,但小兔子心里明白,它们早就没有味道了。



18.
后来小兔子结婚了,是和其貌不扬的小猪,再后来还有了两个孩子。小猪是隔壁村子来旅行的,据他后来说,是来小兔子店里买糖的时候,一眼就喜欢上了这个小机灵。小猪一连来了好几次,每次都是买完糖,付了钱,又悄悄把糖留下。兔妈妈说,这样的孩子品行好,可以嫁了。小猪果然也没让兔妈妈失望,结婚后包揽了所有家务,他家都夸小兔子好福气。小兔子也总是笑眯眯的,她常常摸着两个孩子的头说,如果你们喜欢上一个人啊,就找他要一颗糖。



19.
故事就要结束了。没人知道,当年小猪留下的糖,是小兔子准备吃下的毒药。小兔子明明知道是有毒的,却也懒得阻拦就卖给了小猪。她想,这些贪图甜腻的人啊,总该受到些惩罚。当她刚准备重新拿出毒药服下的时候,发现了小猪买走的糖,居然安安静静的放在罐子中。



20.
第天小猪又来了,第三天也是。小兔子还是给他有毒的糖,她甚至不明白自己为什么要这样残忍,他总想着只要小猪收下一次,一切就都结束了。可小猪每次都巧妙的放回了罐子里,然后趁小兔子还来不及发现就走了。小兔子在和自己较劲中,似乎又看到了春天。他幸免的不只是那些有毒的糖果,而是小兔子这些年对这个世界巨大的失望。终于他们相爱了,后面的故事也水到渠成了。



21.
可她忘记了兔妈妈说的,你拿谎言去考验爱情,就永远遇不到真心的爱人。



22.
有一次小猪喝多了,朋友们起哄问到他当时怎么想到不收下糖果。小猪被灌了太多酒,回答的稀里糊涂,颠三倒四。但当那些字组合在一起,传到小兔子耳朵里时。在场的谁也没听懂,只有她在一瞬间放声大哭。



23.
小猪说,那天啊,那天我只是路过来着,小熊硬塞的钱,小老虎说如果我能把糖放回去,冰淇淋机就是我的了。



24.
嗯,故事说完了。

别哭,这世界是守恒的。你付出的每一颗糖都去了该去的地方。

那些你爱过的人,总会在平行时空,爱着你。

Thursday, March 20, 2014

10 Ways to Improve Your Web Page Performance

There are a million and one ways to boost your website’s performance. The methods vary and some are more involved than others. The three main areas that you can work on are: hardware (your web server), server-side scripting optimization (PHP, Python, Java), and front-end performance (the meat of the web page).

This article primarily focuses on front-end performance since it’s the easiest to work on and provides you the most bang for your buck.
Why focus on front-end performance?

The front-end (i.e. your HTML, CSS, JavaScript, and images) is the most accessiblepart of your website. If you’re on a shared web hosting plan, you might not have root (or root-like) access to the server and therefore can’t tweak and adjust server settings. And even if you do have the right permissions, web server and database engineering require specialized knowledge to give you any immediate benefits.

It’s also cheap. Most of the front-end optimization discussed can be done at no other cost but your time. Not only is it inexpensive, but it’s the best use of your time because front-end performance is responsible for a very large part of a website’s response time.

With this in mind, here are a few simple ways to improve the speed of your website.

1. Profile your web pages to find the culprits.





It’s helpful to profile your web page to find components that you don’t need or components that can be optimized. Profiling a web page usually involves a tool such asFirebug to determine what components (i.e. images, CSS files, HTML documents, and JavaScript files) are being requested by the user, how long the component takes to load, and how big it is. A general rule of thumb is that you should keep your page components as small as possible (under 25KB is a good target).

Firebug’s Net tab (shown above) can help you hunt down huge files that bog down your website. In the above example, you can see that it gives you a break down of all the components required to render a web page including: what it is, where it is, how big it is, and how long it took to load.

There are many tools on the web to help you profile your web page – check out this guide for a few more tools that you can use.

2. Save images in the right format to reduce their file size.



If you have a lot of images, it’s essential to learn about the optimal format for each image. There are three common web image file formats: JPEG, GIF, and PNG. In general, you should use JPEG for realistic photos with smooth gradients and color tones. You should use GIF or PNG for images that have solid colors (such as charts and logos).

GIF and PNG are similar, but PNG typically produces a lower file size. Read Coding Horror’s weigh-in on using PNG’s over GIF’s.

3. Minify your CSS and JavaScript documents to save a few bytes.

Minification is the process of removing unneeded characters (such as tabs, spaces, source code comments) from the source code to reduce its file size. For example:

This chuck of CSS:.some-class { color: #ffffff; line-height: 20px; font-size: 9px; }


can be converted to:.some-class{color:#fff;line-height:20px;font-size:9px;}


…and it’ll work just fine.

And don’t worry – you won’t have to reformat your code manually. There’s a plethora of free tools available at your disposal for minifying your CSS and JavaScript files. For CSS, you can find a bunch of easy-to-use tools from this CSS optimization tools list. For JavaScript, some popular minification options are JSMIN, YUI Compressor, andJavaScript Code Improver. A good minifying application gives you the ability to reverse the minification for when you’re in development. Alternatively, you can use an in-browser tool like Firebug to see the formatted version of your code.

4. Combine CSS and JavaScript files to reduce HTTP requests

For every component that’s needed to render a web page, an HTTP request is created to the server. So, if you have five CSS files for a web page, you would need at least five separate HTTP GET requests for that particular web page. By combining files, you reduce the HTTP request overhead required to generate a web page.

Check out Niels Leenheer’s article on how you can combine CSS and JS files using PHP(which can be adapted to other languages). SitePoint discusses a similar method ofbundling your CSS and JavaScript;they were able to shave off 1.6 seconds in response time, thereby reducing the response time by 76% of the original time.

Otherwise, you can combine your CSS and JavaScript files using good, old copy-and-paste‘ing (works like a charm).

5. Use CSS sprites to reduce HTTP requests



A CSS Sprite is a combination of smaller images into one big image. To display the correct image, you adjust the background-position CSS attribute. Combining multiple images in this way reduces HTTP requests.

For example, on Digg (shown above), you can see individual icons for user interaction. To reduce server requests, Digg combined several icons in one big image and then used CSS to position them appropriately.

You can do this manually, but there’s a web-based tool called CSS Sprite Generatorthat gives you the option of uploading images to be combined into one CSS sprite, and then outputs the CSS code (the background-position attributes) to render the images.

6. Use server-side compression to reduce file sizes

This can be tricky if you’re on a shared web host that doesn’t already server-side compression, but to fully optimize the serving of page components they should be compressed. Compressing page objects is similar to zipping up a large file that you send through email: You (web server) zip up a large family picture (the page component) and email it to your friend (the browser) – they in turn unpack your ZIP file to see the picture. Popular compression methods are Deflate and gzip.

If you run your own dedicated server or if you have a VPS – you’re in luck – if you don’t have compression enabled, installing an application to handle compression is a cinch. Check out this guide on how to install mod_gzip on Apache.

7. Avoid inline CSS and JavaScript

By default, external CSS and JavaScript files are cached by the user’s browser. When a user navigates away from the landing page, they will already have your stylesheets and JavaScript files, which in turn saves them the need to download styles and scripts again. If you use a lot of CSS and JavaScript in your HTML document, you won’t be taking advantage of the web browser’s caching features.

8. Offload site assets and features



Unloading some of your site assets and features to third-party web services greatly reduces the work of your web server. The principle of offloading site assets and features is that you share the burden of serving page components with another server.

You can use Feedburner to handle your RSS feeds, Flickr to serve your images (be aware of the implications of offloading your images though), and the Google AJAX Libraries API to serve popular JavaScript frameworks/libraries like MooTools, jQuery, and Dojo.

For example, on Six Revisions I use Amazon’s Simple Storage Service (Amazon S3 for short), to handle the images you see on this page, as well as Feedburner to handle RSS feeds. This allows my own server to handle just the serving of HTML, CSS, and CSS image backgrounds. Not only are these solutions cost-effective, but they drastically reduce the response times of web pages.

9. Use Cuzillion to plan out an optimal web page structure



Cuzillion is a web-based application created by Steve Souders (front-end engineer for Google after leaving Yahoo! as Chief of Performance) that helps you experiment with different configurations of a web page’s structure in order to see what the optimal structure is. If you already have a web page design, you can use Cuzillion to simulate your web page’s structure and then tweak it to see if you can improve performance by moving things around.

View InsideRIA’s video interview of Steve Sounders discussing how Cuzillion works and the Help guide to get you started quickly.

10. Monitor web server performance and create benchmarks regularly.

The web server is the brains of the operation – it’s responsible for getting/sending HTTP requests/responses to the right people and serves all of your web page components. If your web server isn’t performing well, you won’t get the maximum benefit of your optimization efforts.

It’s essential that you are constantly checking your web server for performance issues. If you have root-like access and can install stuff on the server, check out ab – an Apache web server benchmarking tool or Httperf from IBM.

If you don’t have access to your web server (or have no clue what I’m talking about) you’ll want to use a remote tool like Fiddler or HTTPWatch to analyze and monitor HTTP traffic. They will both point out places that are troublesome for you to take a look at.

Benchmarking before and after making major changes will also give you some insight on the effects of your changes. If your web server can’t handle the traffic your website generates, it’s time for an upgrade or server migration.

Monday, November 18, 2013

How to setup ftp on Amazon Cloud Server EC2 Linux Instance



I'm assuming that you already have an EC2 instance created and have associated an Elastic IP Address to it.



Step #1: Install vsftpd

SSH to your EC2 server. Type:> sudo yum install vsftpd


This should install vsftpd.


Step #2: Open up the FTP ports on your EC2 instance

Next, you'll need to open up the FTP ports on your EC2 server. Log in to the AWS EC2 Management Console and select Security Groups from the navigation tree on the left. Select the security group assigned to your EC2 instance. Select the Inbound tab and add port range 20-21:



Also add port range 1024-1048:




Step #3: Make updates to the vsftpd.conf file

Edit your vsftpd conf file by typing:> sudo vi /etc/vsftpd/vsftpd.conf


Disable anonymous FTP by changing this line:anonymous_enable=YES


toanonymous_enable=NO


Then add the following lines to the bottom of the vsftpd.conf file:pasv_enable=YES pasv_min_port=1024 pasv_max_port=1048 pasv_address=<Public IP of your instance>


Your vsftpd.conf file should look something like the following - except make sure to replace the pasv_address with your public facing IP address:




Step #4: Restart vsftpd

Restart vsftpd by typing:> sudo /etc/init.d/vsftpd restart


You should see a message that looks like:






Step #5: Create an FTP user

If you take a peek at /etc/vsftpd/user_list, you'll see the following:# vsftpd userlist # If userlist_deny=NO, only allow users in this file # If userlist_deny=YES (default), never allow users in this file, and # do not even prompt for a password. # Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers # for users that are denied. root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody


This is basically saying, "Don't allow these users FTP access." vsftpd will allow FTP access to any user not on this list.

So, in order to create a new FTP account, you may need to create a new user on your server. (Or, if you already have a user account that's not listed in /etc/vsftpd/user_list, you can skip to the next step.)

Creating a new user on an EC2 instance is pretty simple. For example, to create the user 'bret', type:> sudo adduser bret > sudo passwd bret


Here's what it will look like:






Step #6: Restricting users to their home directories

At this point, your FTP users are not restricted to their home directories. That's not very secure, but we can fix it pretty easily.

Edit your vsftpd conf file again by typing:> sudo vi /etc/vsftpd/vsftpd.conf


Un-comment out the line:chroot_local_user=YES


It should look like this once you're done:



Restart the vsftpd server again like so:> sudo /etc/init.d/vsftpd restart


All done!



Appendix A: Surviving a reboot

vsftpd doesn't automatically start when your server boots. If you're like me, that means that after rebooting your EC2 instance, you'll feel a moment of terror when FTP seems to be broken - but in reality, it's just not running!. Here's a handy way to fix that:> sudo chkconfig --level 345 vsftpd on


Alternatively, if you are using redhat, another way to manage your services is by using this nifty graphic user interface to control which services should automatically start:> sudo ntsysv




Now vsftpd will automatically start up when your server boots up.

Monday, November 4, 2013

How to run tomcat at 80 port in Amazon Web Service EC2 instance

Just simply run the following command to redirect any request from 8080 to 80:

sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

sudo service iptables save

Thursday, July 4, 2013

解除mac版迅雷对 Safari 浏览器下载劫持的方法



安装迅雷 for Mac 后,再次被国产软件恶心到了。我明明没有在软件设置里选择 “捕获浏览器下载链接”,也没有安装迅雷的浏览器扩展插件,可是在苹果 Safari 浏览器里点击网页里的文件下载链接,还是会强制弹出迅雷 for Mac。 你妹,到 Mac 平台还是耍流氓,劫持苹果电脑上浏览器的下载。




打开 Finder,选择屏幕顶部菜单栏的 “前往” - “前往文件夹”。粘入下面这行路径:




~/Library/Internet Plug-Ins/aThunderPlugIn.plugin


删掉那个 ThunderPlugIn.plugin 的替身文件。然后重复上面的步骤,到这个路径


/Applications/Thunder.app/Contents/BrowserPlugins








删掉 ThunderPlugIn.plugin,重启 Safari 浏览器(command + Q)。再点击网页里的下载链接,就不会自动弹出迅雷 for Mac 了。Firefox 和 Chrome 浏览器的话,卸掉扩展插件即可。

Thursday, October 6, 2011

Remembering Steve Jobs




Quotes
  • Stay hungry, stay foolish.
    • His mantra adopted from the final Whole Earth Catalog.

We're gambling on our vision, and we would rather do that than make "me too" products.

It's more fun to be a pirate than to join the navy.

Being the richest man in the cemetery doesn't matter to me ... Going to bed at night saying we've done something wonderful... that's what matters to me.

I would trade all of my technology for an afternoon with Socrates.

We think basically you watch television to turn your brain off, and you work on your computer when you want to turn your brain on.

The system is that there is no system...

I think if you do something and it turns out pretty good, then you should go do something else wonderful, not dwell on it for too long. Just figure out what's next.

And one more thing...
  • Was George Orwell right about 1984?
    • Keynote address at Apple's annual sales conference first introducing the Macintosh "1984" commercial, which ends with the announcer saying "On January 24th, Apple Computer will introduce Macintosh. And you'll see why 1984 won't be like 1984." (October 1983) - (online video)
  • We're gambling on our vision, and we would rather do that than make "me too" products. Let some other companies do that. For us, it's always the next dream.
    • Interview about the release of the Macintosh (24 January 1984) - (online video)
  • It's rare that you see an artist in his 30s or 40s able to really contribute something amazing.
    • At age 29, as quoted in Playboy (February 1985)
  • The Japanese have hit the shores like dead fish. They're just like dead fish washing up on the shores.
    • As quoted in Playboy (February 1985)
  • It is hard to think that a $2 billion company with 4,300-plus people couldn't compete with six people in blue jeans.
    • On Apple's lawsuit against him, following his resignation to form NeXT, as quoted in Newsweek (30 September 1985)
  • Real artists ship.
    • An old saying at Apple Computer, attributed to Steve Jobs, meaning that it is important to actually deliver.[1]
  • They're babes in the woods. I think I can help turn Alvy and Ed into businessmen.
  • If, for some reason, we make some big mistake and IBM wins, my personal feeling is that we are going to enter a computer Dark Ages for about twenty years.
    • On the early rivalry between Macintosh and "IBM-compatible" computers based on Microsoft's DOS, as quoted in Steve Jobs: The Journey is the Reward (1987) by Jeffrey S. Young, p. 235
  • I feel like somebody just punched me in the stomach and knocked all my wind out. I'm only 30 years old and I want to have a chance to continue creating things. I know I've got at least one more great computer in me. And Apple is not going to give me a chance to do that.
    • On his expulsion from any position of authority at Apple, after having invited John Sculley to become CEO, as quoted in Playboy (September 1987)
  • Do you want to spend the rest of your life selling sugared water or do you want a chance to change the world?
    • A comment he made in persuading John Sculley to become Apple's CEO, as quoted in Odyssey: Pepsi to Apple: A Journey of Adventure, Ideas, and the Future (1987) by John Sculley and John A. Byrne
  • It's more fun to be a pirate than to join the navy.
    • At a retreat in September 1982, as quoted in John Sculley and John A. Byrne, Odyssey: Pepsi to Apple – A Journey of Adventure, Ideas, and the Future (1987), p. 157
    • Variant: Why join the Navy . . . if you can be a pirate?
      • As quoted or paraphrased in Young Guns: The Fearless Entrepreneur's Guide to Chasing Your Dreams and Breaking Out on Your Own (2009) by Robert Tuchman, p. 18
  • You can't just ask customers what they want and then try to give that to them. By the time you get it built, they'll want something new.
    • Interview with Inc. Magazine for its "The Entrepreneur of the Decade Award" (April 1, 1989) - [2]
  • It'll make your jaw drop.
    • On the first NeXT Computer, as quoted in The New York Times (8 November 1989)
  • My opinion is that the only two computer companies that are software-driven are Apple and NeXT, and I wonder about Apple.
    • As quoted in Fortune (26 August 1991)
  • Being the richest man in the cemetery doesn't matter to me ... Going to bed at night saying we've done something wonderful... that's what matters to me.
    • On the success of Bill Gates and Microsoft, as quoted in The Wall Street Journal (Summer 1993)
  • Unfortunately, people are not rebelling against Microsoft. They don’t know any better.
    • Interview in Rolling Stone magazine, no. 684 (16 June 1994)
  • John Sculley ruined Apple and he ruined it by bringing a set of values to the top of Apple which were corrupt and corrupted some of the top people who were there, drove out some of the ones who were not corruptible, and brought in more corrupt ones and paid themselves collectively tens of millions of dollars and cared more about their own glory and wealth than they did about what built Apple in the first place — which was making great computers for people to use.
    • Statement in The Computerworld Smithsonian Awards Program oral history, (20 April 1995)
  • We believe it's the biggest advance in animation since Walt Disney started it all with the release of Snow White 50 years ago.
    • On Toy Story as quoted in Fortune (18 September 1995)
  • If I knew in 1986 how much it was going to cost to keep Pixar going, I doubt if I would have bought the company.
    • As quoted in Fortune (18 September 1995)
  • You know, I've got a plan that could rescue Apple. I can't say any more than that it's the perfect product and the perfect strategy for Apple. But nobody there will listen to me.
    • As quoted in Fortune (18 September 1995)
  • When you're young, you look at television and think, There's a conspiracy. The networks have conspired to dumb us down. But when you get a little older, you realize that's not true. The networks are in business to give people exactly what they want. That's a far more depressing thought. Conspiracy is optimistic! You can shoot the bastards! We can have a revolution! But the networks are really in business to give people what they want. It's the truth.
    • Interview in WIRED magazine (February 1996)
  • [Miele] really thought the process through. They did such a great job designing these washers and dryers. I got more thrill out of them than I have out of any piece of high tech in years.
    • On design excellence, in WIRED magazine (February 1996)
  • If I were running Apple, I would milk the Macintosh for all it's worth — and get busy on the next great thing. The PC wars are over. Done. Microsoft won a long time ago.
    • As quoted in Fortune (19 February 1996)
  • I was worth about over a million dollars when I was twenty-three and over ten million dollars when I was twenty-four, and over a hundred million dollars when I was twenty-five and it wasn't that important because I never did it for the money.
  • The only problem with Microsoft is they just have no taste. They have absolutely no taste. And I don't mean that in a small way, I mean that in a big way, in the sense that they don't think of original ideas, and they don't bring much culture into their products.
    • Triumph of the Nerds (1996)
  • I am saddened, not by Microsoft's success — I have no problem with their success. They've earned their success, for the most part. I have a problem with the fact that they just make really third-rate products.
    • Triumph of the Nerds (1996)
  • We have always been shameless about stealing great ideas.
    • Triumph of the Nerds (1996)
  • The products suck! There's no sex in them anymore!
    • On products at Apple, just before his return to it BusinessWeek (July 1997)
  • Apple has some tremendous assets, but I believe without some attention, the company could, could, could — I'm searching for the right word — could, could die.
    • On his return as interim CEO of Apple, as quoted in TIME magazine (18 August 1997)
  • Nobody has tried to swallow us since I've been here. I think they are afraid how we would taste.
    • At the annual Apple shareholder meeting (22 April 1998)
  • iMac is next year's computer for $1,299, not last year's computer for $999.
    • Introduction of the first iMac computer in Cupertino, Calif., (6 May 1998)
  • It's really hard to design products by focus groups. A lot of times, people don't know what they want until you show it to them.
    • As quoted in BusinessWeek (25 May 1998)
  • Innovation has nothing to do with how many R&D dollars you have. When Apple came up with the Mac, IBM was spending at least 100 times more on R&D. It's not about money. It's about the people you have, how you're led, and how much you get it.
  • I think Pixar has the opportunity to be the next Disney — not replace Disney — but be the next Disney.
    • As quoted in BusinessWeek (23 November 1998)
  • We made the buttons on the screen look so good you'll want to lick them.
    • On Mac OS X's Aqua user interface, as quoted in Fortune magazine (4 January 2000)
  • You've baked a really lovely cake, but then you've used dog shit for frosting.
    • Steve Jobs commenting on a NeXT programmer's work, as quoted in The Second Coming of Steve Jobs (2000) by Alan Deutschman
  • I would trade all of my technology for an afternoon with Socrates.
    • As quoted in Newsweek (29 October 2001)
  • It will go down in history as a turning point for the music industry. This is landmark stuff. I can't overestimate it!
    • On the iPod and the iTunes Music Store, as quoted in Fortune magazine (12 May 2003)
  • There are sneakers that cost more than an iPod.
    • On the iPod's $300 price tag, as quoted in Newsweek (27 October 2003)
  • We don't believe it's possible to protect digital content ... What's new is this amazingly efficient distribution system for stolen property called the Internet — and no one's gonna shut down the Internet. And it only takes one stolen copy to be on the Internet. And the way we expressed it to them is: Pick one lock — open every door. It only takes one person to pick a lock. Worst case: Somebody just takes the analog outputs of their CD player and rerecords it — puts it on the Internet. You'll never stop that. So what you have to do is compete with it.
  • The subscription model of buying music is bankrupt. I think you could make available the Second Coming in a subscription model and it might not be successful.
    • As quoted in "Steve Jobs: The Rolling Stone Interview" in Rolling Stone (3 December 2003)
  • We think basically you watch television to turn your brain off, and you work on your computer when you want to turn your brain on.
    • Interview in Macworld magazine (February 2004)
  • Why would I ever want to run Disney? Wouldn't it make more sense just to sell them Pixar and retire?
    • As quoted in Fortune (23 February 2004)
  • The cure for Apple is not cost-cutting. The cure for Apple is to innovate its way out of its current predicament.
    • As quoted in Apple Confidential 2.0: The Definitive History of the World's Most Colorful Company (2004) by Owen W. Linzmayer
  • It wasn't that Microsoft was so brilliant or clever in copying the Mac, it's that the Mac was a sitting duck for 10 years. That's Apple's problem: Their differentiation evaporated.
    • As quoted in Apple Confidential 2.0: The Definitive History of the World's Most Colorful Company (2004) by Owen W. Linzmayer
  • I'm the only person I know that's lost a quarter of a billion dollars in one year.... It's very character-building.
    • As quoted in Apple Confidential 2.0: The Definitive History of the World's Most Colorful Company (2004) by Owen W. Linzmayer
  • I've always wanted to own and control the primary technology in everything we do.
    • As quoted in "The Seed of Apple's Innovation" in BusinessWeek (12 October 2004)
  • The system is that there is no system. That doesn't mean we don't have process. Apple is a very disciplined company, and we have great processes. But that's not what it's about. Process makes you more efficient.
    But innovation comes from people meeting up in the hallways or calling each other at 10:30 at night with a new idea, or because they realized something that shoots holes in how we've been thinking about a problem. It's ad hoc meetings of six people called by someone who thinks he has figured out the coolest new thing ever and who wants to know what other people think of his idea.
    And it comes from saying no to 1,000 things to make sure we don't get on the wrong track or try to do too much. We're always thinking about new markets we could enter, but it's only by saying no that you can concentrate on the things that are really important.
    • As quoted in "The Seed of Apple's Innovation" in BusinessWeek (12 October 2004)
  • Pixar is the most technically advanced creative company; Apple is the most creatively advanced technical company.
    • As quoted in Fortune (21 February 2005)
  • They are shamelessly copying us.
    • About Microsoft and the operating system which would be released as Vista, as quoted in "Apple's Jobs swipes at Longhorn" om cNet News (21 April 2005)
  • Because I'm the CEO, and I think it can be done.
    • On why he chose to override engineers who thought the iMac wasn't feasible, as quoted in TIME magazine (24 October 2005)
  • Click. Boom. Amazing!
    • MacWorld "Intel Inside" keynote address (January 2006)
  • Everyone wants a MacBook Pro because they are so bitchin'.
    • Statement at the Apple Annual Shareholder Meeting (April 2006)
  • Our friends up north spend over five billion dollars on research and development and all they seem to do is copy Google and Apple.
  • Look at the design of a lot of consumer products — they're really complicated surfaces. We tried to make something much more holistic and simple. When you first start off trying to solve a problem, the first solutions you come up with are very complex, and most people stop there. But if you keep going, and live with the problem and peel more layers of the onion off, you can often times arrive at some very elegant and simple solutions. Most people just don't put in the time or energy to get there. We believe that customers are smart, and want objects which are well thought through.
    • On the design of the iPod, as quoted in Newsweek (14 October 2006)
  • We had the hardware expertise, the industrial design expertise and the software expertise, including iTunes. One of the biggest insights we have was that we decided not to try to manage your music library on the iPod, but to manage it in iTunes. Other companies tried to do everything on the device itself and made it so complicated that it was useless.
    • On the design of the iPod, as quoted in Newsweek (14 October 2006)

The art of those commercials is not to be mean, but it is actually for the guys to like each other.
  • I've seen the demonstrations on the Internet about how you can find another person using a Zune and give them a song they can play three times. It takes forever. By the time you've gone through all that, the girl's got up and left! You're much better off to take one of your earbuds out and put it in her ear. Then you're connected with about two feet of headphone cable.
    • When asked whether he was concerned over Microsoft Zune's wireless capability, as a product competing with Apple's iPod, as quoted in Newsweek (14 October 2006)
  • Every once in a while a revolutionary product comes along that changes everything. It's very fortunate if you can work on just one of these in your career. ... Apple's been very fortunate in that it's introduced a few of these.
  • People think it's this veneer -- that the designers are handed this box and told, 'Make it look good!' That's not what we think design is. It's not just what it looks like and feels like. Design is how it works.
  • The HD revolution is over, it happened. HD won. Everybody wants HD.
    • Apple Special Event Keynote, September 1, 2010.

[edit]WWDC 2005

Keynote address at Apple's Worldwide Developer's Conference, where Jobs announced plans for Mac OS 10.5 "Leopard," and a switch from IBM PowerPC to Intel processors. (6 June 2005)

Mac OS X has been leading a secret double life — for the past five years.
  • Yes, it's true.
    • On the plans for Apple Computer, Inc. to begin using Intel processors in its Macintosh computers during 2006 and 2007. About twenty two minutes into his address. Rumors of such plans had existed for years, but had been growing more credible and prolific for about a week before his announcement.
  • Now, I have something to tell you today. Mac OS X has been leading a secret double life — for the past five years. There have been rumors to this effect... but this is Apple's campus in Cupertino — let's zoom in on it — in that building right there... we've had teams doing the "just-in-case" scenario; and our rules have been that our designs for OS X must be processor independent, and that every project must be built for both the Power PC and Intel processors. And so today for the first time, I can confirm the rumors that every release of OS X has been compiled for both Power PC and Intel — this has been going on for the last five years. Just in case.
  • So Mac OS X is cross-platform by design, right from the very beginning. So Mac OS X is singing on Intel processors, and I'd just like to show you right now. As a matter of fact... this system I've been using here... Let go have a look... [reveals that the system he had been using for the presentation was running Mac OS X 10.4.1 on a machine using a 3.6 GHz Pentium 4 processor] So.. we've been running on an Intel machine all morning.
  • We intend to release Leopard at the end of 2006 or early 2007, right around the time when Microsoft is expected to release Longhorn.

[edit]Address at Stanford University (2005)


Your time is limited, so don't waste it living someone else's life.
Stanford University commencement address (12 June 2005)

Don't be trapped by dogma — which is living with the results of other people's thinking.

The only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it.
  • When I was 17, I read a quote that went something like: "If you live each day as if it was your last, someday you'll most certainly be right." It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: "If today were the last day of my life, would I want to do what I am about to do today?" And whenever the answer has been "No" for too many days in a row, I know I need to change something.
  • I didn't see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.
  • Death is the destination we all share, no one has ever escaped it. And that is as it should be because death is very likely the single best invention of life.
  • Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma — which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.
  • Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure — these things just fall away in the face of death, leaving only what is truly important.Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.
  • No one wants to die. Even people who wanna go to heaven don't wanna die to get there.
  • When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960's, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and Polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.
  • I decided to take a calligraphy class to learn how to [learn calligraphy]. I learned about serif and sans-serif typefaces, about varying the space between different letter combinations, about what makes great typography great. It was beautiful. Historical. Artistically subtle in a way that science can't capture. And I found it fascinating. None of this had any hope of any practical application in my life. But 10 years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would never have multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, it's likely that no personal computer would have them.
  • Again, you can't connect the dots looking forward; you can only connect them looking backwards.
    So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.
  • The only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it.