??xml version="1.0" encoding="utf-8" standalone="yes"?>视频在线在亚洲,国产精品久久二区二区,国产精品视频在线播放http://www.aygfsteel.com/sealyu/category/44841.html--- The devil's in the Details (<a >http://www.sealyu.com</a>)zh-cnTue, 14 Sep 2010 14:58:12 GMTTue, 14 Sep 2010 14:58:12 GMT60让你的TextMate支持GB2312,BIG{亚z编??http://www.aygfsteel.com/sealyu/archive/2010/09/08/331424.htmlsealsealWed, 08 Sep 2010 11:40:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/09/08/331424.htmlhttp://www.aygfsteel.com/sealyu/comments/331424.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/09/08/331424.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/331424.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/331424.html问题是我们使用TextMate不支持GB2312{编码,用着?qing)其不方便,下面是解x案:(x)

打开Bundle Editor
选则Show all

选则文g?span class="hilite1" style="background-color: #ffff00;">TextMateQ或者随便你选则什么)
增加一个新的template‘openEncodedFile’Q或者随便你自己命名Q?br /> 在Template data中如下设?br /> ExtensionQ中 留空

Command(s):

# open CocoaDialog’s file select menu

file=$(CocoaDialog fileselect \
--title "Open an encoded file" \
--with-directory $HOME/ \
)
# check for valid file
if [ -n "$file" ]; then
# open CocoaDialog's dropdown menu
# for more encodings add them to '--items'
# to list all possibile encodings use the Terminal with 'iconv -l'
res=$(CocoaDialog dropdown \
--title "Open an encoded file" \
--text "Choose the encoding:" \
??exit?onchange \
--button1 "Open" \
--button2 "Cancel" \
--items "BIG5" "EUC-TW" "GB2312" "SJIS" "EUC-JP" "KOI8-R" \
)
# if user canceled exit
[[ $( (tail -r &amp;lt;&amp;lt;&amp;lt;"$res") | tail -n1) == "2" ]] &amp;amp;&amp;amp; \
exit_discard
res=$(tail -n1 &amp;lt;&amp;lt;&amp;lt;"$res")
# add more 'elif' according to '--items' if needed
if [ "$res" == 0 ]; then
ENC="BIG5"
elif [ "$res" == 1 ]; then
ENC="EUC-TW"
elif [ "$res" == 2 ]; then
ENC="GB2312"
elif [ "$res" == 3 ]; then
ENC="SJIS"
elif [ "$res" == 4 ]; then
ENC="EUC-JP"
elif [ "$res" == 5 ]; then
ENC="KOI8-R"
fi
# start conversion to UTF-8 and send the result as a new file back to TM
iconv -f "$ENC" -t utf-8 "$file" &amp;gt; "$TM_NEW_FILE"
fi
Output: Insert as Text - Activation: Key Equivalent shift+option+o (我的) - Scope: 留空



seal 2010-09-08 19:40 发表评论
]]>
HowTo: Create a local environment using MAMPhttp://www.aygfsteel.com/sealyu/archive/2010/08/12/328711.htmlsealsealThu, 12 Aug 2010 12:35:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/08/12/328711.htmlhttp://www.aygfsteel.com/sealyu/comments/328711.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/08/12/328711.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/328711.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/328711.htmlMAMP creates a local server environment on Mac OS X by installing PHP, MySQL, and Apache right out of the box. This will make Drupal much easier to install because the components don't have to be installed separately. This page is to be used in conjunction with the installation instructions for Drupal on Mac OS X.

Also you may want to check out this video in the Videocasts section of the handbook: Installing a Local Web Server on Mac OS X.

Download MAMP

(This will install Apache, MySQL, and PHP in one step.)
Find the latest version here: http://www.mamp.info/
Download and drag to Applications folder to install. Open MAMP and click "start servers," then "Open start page."

Download Drupal

Find the latest Drupal release here: http://drupal.org/.

Move the directory containing the Drupal files into the MAMP htdocs directory:

mv drupal-x.x.x/* drupal-x.x.x/.htaccess /Applications/MAMP/htdocs/yourdrupaldir

where yourdrupaldir is whatever you want the directory to be called.

Note: if you use Finder you may miss moving the .htaccess file which is necessary for clean URLs to work. It is generally best to download and unzip Drupal directly in the document root (default is htdocs) so you don't miss the .htaccess.

Create the Drupal database

To create a database for Drupal

  1. Go to the MAMP start page
  2. Click "phpMyAdmin"
  3. On the next page click "Databases"
  4. On the "Databases" page enter a name for your Drupal database in the "Create new database" field at the bottom of the page
  5. Select "utf8_general_ci" under the "Collation" drop-down (must be utf8!)
  6. Click "Create"
  7. Next you must create a user name with the privileges Drupal requires to use the new database
  8. Go back to the main phpMyAdmin page and click "Privileges"
  9. On the next page click "Add a new User".
  10. Fill out the "Login Information" form, making sure to change the "Host" field to "Local" and not leave it as "Any host" (for some reason Drupal will not be able to connect to your local database if you select "Any host")
  11. Leave the "None" radio button selected under the "Database for user" section, and under the "Global privileges" section leave everything unchecked
  12. Click "Go"
  13. On the next page scroll down to the "Database-specific privileges" section and select the new Drupal database you created from the dropdown
  14. Check the SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX and ALTER checkboxes and then click "Go".

You can also use a GUI such as Sequel Pro, just remember to use this as your Socket:

/Applications/MAMP/tmp/mysql/mysql.sock

Changing your password

The default username/password for your MySQL install is now root/root! For security purposes, it's always best to change this. If you're connected to the internet, this is a must.

When you are changing the default user/password from root/root, you need to do two things. Only the first is documented in the MAMP start page FAQ, but if you don't do the second then you get an error message when you try to access anything from the MAMP start page.

  1. Use command line to change the password (as documented in the MAMP start page FAQ)

    Open the terminal and type the following:
    /Applications/MAMP/Library/bin/mysqladmin -u root -p password [NEWPASSWORD]

    It will ask for the current password after you hit enter. Once you have entered that, the MySQL password is changed.

  2. Open a text editor and change the password in the three following files:
    • /Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php

      Find the line that reads...
      $cfg['Servers'][$i]['password']      = 'root';
      ...and change the value 'root' to your new password, retaining the quotes.

    • /Applications/MAMP/bin/mamp/index.php

      Find the line that reads...
      $link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root');
      ...and change the last parameter to your new password.

    • /Applications/MAMP/bin/stopMysql.sh

      Replace the -proot with your password. (If you don't change this one you can have zombie mysqld's running after you thought you stopped the server)

Optional: Adjust PHP's memory limit for scripts

By default, MAMP has the memory limit that a script can use set at 8MB, which is the PHP default. Looking at PHP's php.ini-recommended file, this memory limit is normally set at 128MB. To adjust this amount, open the php.ini file in a text editor and change the following line (approximately on line 232):

memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

PHP.ini file locations:

  • /Applications/MAMP/conf/php4/php.ini
  • /Applications/MAMP/conf/php5/php.ini

In MAMP PRO, don't alter the file directly since it will be recreated at each server start. Please edit the appropriate template (menu File > Edit template > ...) instead.

Even with larger PHP memory limits you can get timeout errors trying to import large Drupal databases into MySQL. These issues are discussed at length elsewhere with regards to the cache and views cache. Generally the solution is to empty the Drupal cache before importing/exporting databases to/from MySQL.

Connect Drupal

Navigate to http://localhost:8888/yourdrupaldir/install.php and fill in the installation fields using the information provided on the MAMP start page and the name you used for the database you created in step 3.

Start configuring Drupal!

Go to http://localhost:8888/yourdrupaldir/ and create the first account.
Continue with instructions in INSTALL.txt.

If you changed your MySQL username and password you will need to modify that in your local Drupal settings.php file as well.

Temporary Files Note:

By default the File System settings (admin/settings/file-system) will place the temporary files directory inside /Applications/MAMP/tmp/php which should be changed to something like files/tmp or sites/files/tmp to avoid later confusion.

Clean up your Localhost URL

If you would like to shorten your URL from "http://localhost:8888" to "http://localhost" follow these instructions:

  • Open the MAMP application
  • Click on "Preferences" and then "Ports"
  • Change the Apache Port to 80 (the standard web server port)
In MAMP PRO, change the port of apache to 80 and click on apply.

seal 2010-08-12 20:35 发表评论
]]>
Mac 定时x的两U方?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/06/11/323340.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Fri, 11 Jun 2010 04:04:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/06/11/323340.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/323340.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/06/11/323340.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/323340.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/323340.html</trackback:ping><description><![CDATA[W一U方法:(x)<br /> <br /> 首先打开pȝ偏好讄<br /> <br /> 点开节能器; <br /> <br /> 然后点击定时~开始设|你的时间吧?br /> <br /> W二U方法:(x)<br /> <br /> <span style="border-bottom: 1px dashed #efefef; line-height: 15pt;"><span style="font-family: 宋体; font-size: 14px;"><span id="Content864933">打开terminal,输入 sudo shutdown -h <yymmddhhmm></span></span></span> QyyQ年?nbsp; mmQ月?nbsp; ddQ天?nbsp; hhQ小?nbsp; mm Q分钟) <img src ="http://www.aygfsteel.com/sealyu/aggbug/323340.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-06-11 12:04 <a href="http://www.aygfsteel.com/sealyu/archive/2010/06/11/323340.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>最好的原型和流E图l制工具QOmniGraffle (MAC OS)http://www.aygfsteel.com/sealyu/archive/2010/05/18/321226.htmlsealsealMon, 17 May 2010 21:23:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/05/18/321226.htmlhttp://www.aygfsteel.com/sealyu/comments/321226.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/05/18/321226.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/321226.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/321226.html

“使用哪种原型设计工具”大概是设计师闲聊时出现频率最高的话题之一。据 我了解一般以Visio和PhotoshopZQ也有h用Flash和PPTQ据一个新来的同事_(d)他们公司q用Excel。我实在想不出用Excel 怎么dQ哈哈。我个h最喜欢的工hOmniGraffleQ如 下图Q,自从我用了它以后Q就再也不想用其它原型设计Y件了?/p>

首先我必隆重介l一?a style="padding: 2px; margin: 0px; color: #336699;" target="_blank" >Omni Groupq家只有26个h的小公司Q他们h数虽,但却产出 了像OmniWeb?a style="padding: 2px; margin: 0px; color: #336699;" target="_blank" >OmniGraffle?a style="padding: 2px; margin: 0px; color: #336699;" target="_blank" >OmniPlan?a style="padding: 2px; margin: 0px; color: #336699;" target="_blank" >OmniOutliner{? {一pd深受用户Ƣ迎的精品YӞ实力l对不容觑?/p>

你可以用OmniGraffleQ以下简UOGQ来做很多事情,我一般用 它来l制程囑֒界面原型。相比较于Visio{工P它的以下特点和功能让人爱不释手:(x)

漂亮的界?/h3>

OG的界面太漂亮了,臛_比灰H突的Visio好看多了?#8220;的是? ?#8221;Q《最佌?00l则》)Q用OGl图的时候脑中常常充满灵感,而对着Visio则只惛_快把工作做完?/p>

能轻而易丄l制出漂亮的囑Ş

OG的可用性做得很好,可以让一名新手很快地l制?#8220;惌一?#8221; QJobs当年评h(hun)OS X界面时的原话Q的程囑֒原型图。我使用它没多久定义了一套自q样式Q如下图Q,q在目中重用?/p>

丰富、精致的模板QStencil/TemplateQ?/h3>

除了官方的模板外Q?a style="padding: 2px; margin: 0px; color: #336699;" target="_blank" >Graffletopia|站提供了众多设计精的模板。不仅有常见 的网l、Y件流E、电(sh)路等cȝQ甚臌有UCD相关的模板(如下图)Q不仅显著提升工作效率,而且也得你的出物与众不同Q?/p>


Information Architecture


User-Centered Design Activities

辅助寚w和尺寸调整功?/h3>

在用Visio的时候,你有多少ơ想把多个元素的大小调成一L(fng)Q反正我 每次用它l制程囄时候都惌么做Q可每次都需要一个个的调_(d)让h无可奈何。在OG里面Q这是一件小菜一的事儿。当你调整Q何一个元素的大小 ӞOG都会(x)自动捕捉q显C页面内所有元素的大小Qƈ辅助鼠标的运动(通过性感Q,以便让这一元素的大和其它M一个你惌的元素保持一_(d)如下 图)。对于没用过OG的h来说Q这听v来可?#8220;震撼”Q我W一ơ发现这功能时激动不Ԍ此外Q保持两个或多个元素在水q_垂直方向上对齐也是轻而易丄 事:(x)辅助Ud你需要的时候出玎ͼ如下图)?/p>


辅助寸调整


辅助寚w

OGq有C清的好用的小功能Q让人感觉无时无M处在q个软g的关怀之中QMQ对于设计类软g来说QOGl对是用 户体验的典范之作?/p>

最后,很不q的是,q个软g只有Mac版。不q如果你只有PC的话Q不? 看看q里 Q)




seal 2010-05-18 05:23 发表评论
]]>如何在Mac OS Xpȝ中启用MySQL(?http://www.aygfsteel.com/sealyu/archive/2010/05/16/321082.htmlsealsealSun, 16 May 2010 01:38:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/05/16/321082.htmlhttp://www.aygfsteel.com/sealyu/comments/321082.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/05/16/321082.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/321082.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/321082.html随着|络日益发展q有os x用户的增多,有可能会(x)需要在自己的xpȝ中运行mysql+php环境Q比如架讄站或者测试之cR简单步骤如下:(x)

  1、下载MySQL 5.x 发行?Q解压ƈ安装映像中的两个安装包文件?/p>

  a. mysql-5.x-osx10.6_x86_64.pkg Qmysql 5.x 标准版安?/p>

  b. MySQLStartupItem.pkgQmysql启动目Q可以上你的?sh)脑在启动系l时自动q行mysql服务。它安装?Library /StartupItems/MySQL/Q如果你不想pȝ启动时运行mysql服务Q请不要安装。如果你在安装后又不想用,请删?Library /StartupItems/MySQL/q个目录?/p>

  启动mysqlQ?/p>

  2、如果你已经安装了MySQLStartupItem.pkgQ重新启动电(sh)脑即可?/p>

  3、如果你有安装MySQLStartupItem.pkg或者不惛_动电(sh)脑,q行Q应用程序-实用E序Q终端程序,在终端中输入命o(h)Q?/p>

  sudo /Library/StartupItems/MySQL/MySQL start

  然后输入你的pȝ理员密码,如果没有讑֮密码q接回车?/p>

  关闭mysql服务Q?/p>

  l端中输入命令:(x)sudo /Library/StartupItems/MySQL/MySQL stop

  然后输入你的pȝ理员密码,如果没有讑֮密码q接回车?/p>

  mysql root账户密码Q?/p>

  mysql root密码初始值是I。这栯然没有问题。但很不安全。徏议你更改root用户密码。注意:(x)mysql root用户和系l中的root用户是不一L(fng)。是完全两个不同的用戗?/p>

  更改mysql root密码请在l端中输入命令:(x)

  /usr/local/mysql/bin/mysqladmin -u root password 新密?/p>

  同时你也可以随时使用q条命o(h)更改你的密码?/p>

  4、下载x版mysql数据库管理工?/p>

  q是一个运行在mac os xpȝ中的mysql数据库管理YӞ支持本地?qing)远E数据库理。ƈ且还是免费的。这个程序的优点是完全CGI界面。ƈ且密码是保存在本Z的。相Ҏ(gu)? 安全?/p>

seal 2010-05-16 09:38 发表评论
]]>
MAC中jdk的目??http://www.aygfsteel.com/sealyu/archive/2010/04/28/319546.htmlsealsealTue, 27 Apr 2010 16:09:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/04/28/319546.htmlhttp://www.aygfsteel.com/sealyu/comments/319546.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/04/28/319546.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/319546.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/319546.html  
  在这个目录下有个Versions目录Q里面有不同版本的jdk?br />
1.怎样讄mac中的默认java版本?Q?/strong>

先看一下mac中,java链接C哪里Q?/font>

q入到相应的目录Qcd /usr/bin

查看java链接C哪里Qls -l java

localhost:bin root# ls -l java
lrwxr-xr-x 1 root wheel 74 May 18 10:26 java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
可以看到javaq接Ccurrent版本。那么这个到底是什么版本呢Q其实,mac中current只是一个快h? 而已Q是Z方便讄默认java的?/font>

q个链接q到哪里Q默认的java是哪个。但是在mac中可以保持这个java链接不变Q只是改变一下当前的 java卛_Q下面是步骤Q?/font>

1Q打开Finder Q?单击桌面地步的finder图标卛_?/font>

2QApplication-->Utilities-->Java-->Java Preferences

3)q二步可以打开“Java Preferences”对话框,选中“General”tab。在下面?#8220;Java Application Runtime Settings”区把需要的java版本拖动到最端卛_?/font>

最端的java是当前QcurrentQjavaQ这样在改变默认java版本时就不用?usr/bin下重 新设|java链接Q而是直接在这里把需要的java拖到最上面p?/font>

2.MAC中的javahome讄

在windows中,javahome的值只是取到版本号的目录即可,但是在mac中有E微的不同,要去到版本号? 录下的Home目录Q如Q?/font>

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

3. 在MAC中设|JAVA_HOME环境变量

环境变量要再etc目录下的profile文g中配|,q样才是怹的配|?br />

cd /etc

vi profile

输入如下内容Q?/font>

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

export JAVA_HOME

保存。然后重启或者注销Q环境变量的配|v作用?br />

q样javahome的环境便令配|好了?/font>

同样的道理,我们可以在profileq个文g中进行PATH,CALSSPATH{环境变量的配置?/font>



seal 2010-04-28 00:09 发表评论
]]>
OS X: Change your PATH environment variablehttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319540.htmlsealsealTue, 27 Apr 2010 15:08:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319540.htmlhttp://www.aygfsteel.com/sealyu/comments/319540.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319540.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/319540.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/319540.htmlWhen you run a command from a UNIX or UNIX-like shell, the shell looks for the executable file using the directories listed in your PATH variable as a map. For convenience, adding directories to this environment variable means you don’t have to go hunting for a file each time you run it. Following these directions will allow you to add a directory to the search PATH.


To change your path, you must edit the .profile file in your home directory. If you are comfortable using the vi editor, you probably don’t need to read any further. If not, then you can use TextEdit to edit your .profile.

The default .profile is fairly short. The .profile is read when you open a Terminal window and each line is executed just like typing a command into the Terminal window. While this is handy because you can make any available command run whenever you drop to a shell, we’re concerned with changing an environment variable, PATH.

In your editor, find the line that starts with export PATH= and give it a look to make sure it doesn’t already contain the directory path you’re going to add. Sometimes the PATH variable can get lengthy, but chances are yours just has a few directories separated by colons, perhaps something like this:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

There are a few things to note before making changes. The format of this line is important. The use of spaces in this command, or their lack, matters. In particular, there cannot be spaces around the equals sign or between any of the directories. If there are spaces in the directory name you want to add, you’ll need to escape the space by preceeding it with a "backslash or by putting the path in quotes (export PATH=”/path/here”).

The export= keyword in front of that line has a very specific purpose. Defining a variable without exporting it makes it available only to the current shell, not to any subsequent shells. You may think to yourself that you don’t plan to make any subsequent shells, but this happens whenever you run a shell script. If the PATH variable was not exported, when you run a shell script, the PATH would no longer exist and it is possible that the script would fail.

The $PATH at the end of the example above tacks the previous value of the variable (if it exists) onto the end of the PATH. By default, this will add ‘:/bin:/sbin:/usr/bin:/usr/sbin’ to the end of the PATH for you which is useful because most everything you run from the command line lives there.

So, to add a new directory to the path, simply add it to the existing PATH line in .profile being careful to separate it from other directories there with colons and careful not to introduce unwanted spaces (everything after the space will be ignored). For example, to add the directory /mightyq/bin to the PATH shown above, the line could become any of the following examples:

export PATH=/mightyq/bin:/opt/local/bin:/opt/local/sbin:$PATH
export PATH=/opt/local/bin:/mightyq/bin:/opt/local/sbin:$PATH
export PATH=/opt/local/bin:/opt/local/sbin:$PATH:/mightyq/bin

Note that in the third example the new directory is added to the end of the PATH. You have the ability to optimize the searches your shell will do on your behalf each time you run a command by organizing your PATH logically. Putting less frequently used or really massive directories later in the path may give you a little performance boost (although these days things are pretty fast, so you have to be a little anal to really enjoy this).

If you don’t need a directory in your path, you can reverse the process by deleting the unwanted directory still taking care to preserve the no spaces, colon separation rules.

One last note, to test the change you made, you can use the echo command, but you need to make the shell reload the .profile first. Assuming you are in your home directory (if not, running ‘cd’ without any options will take you there), run these commands:

. ./.profile
echo $PATH

The first is a neat little command in that it shows three uses or interpretations of the period in a single line. The first . is a shortcut to cause the shell to ’source’ or load the contents of the subsequent file as itself, in the manner that the shell uses when you login to a system or start a Terminal window. If you simply executed these commands like a shell script (bash .profile, for example) you would start a new shell, that shell would get the variable set, and at the end of running the .profile script, that new shell would cease to exist and the newly defined variables would be relegated to the missing sock universe.

The second period means the current working directory. It’s not compulsory in any way in this command, but it’s habit from explaining the dots to folks, so I type it all the time now. In this context, you could also use ~/.profile as ~ explicitly means your home directory.

The last dot causes the .profile to be hidden from view in a normal directory listing or Finder view. It doesn’t change the file in any other way, it just make it invisible and de-clutters your directories. To see hidden files, you can use ‘ls -a’ and you might be surprised by what you find.



seal 2010-04-27 23:08 发表评论
]]>
OS X: Easily edit hidden configuration files with TextEdithttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319539.htmlsealsealTue, 27 Apr 2010 15:06:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319539.htmlhttp://www.aygfsteel.com/sealyu/comments/319539.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319539.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/319539.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/319539.htmlIn OS X, hidden files (those starting with a period like .profile or .bashrc) can be a challenge to edit because they are, well, hidden and don’t show up in Finder windows. While there are tricks to make hidden files visible in Finder windows, I prefer to keep my hidden files hidden. I also prefer to edit them using vi, but I know that many folks are likely to think ’six’ instead of ‘editor’ when presented with vi. What follows is a simple way to edit a hidden file using TextEdit without making any changes to the system.


When confronted with the task of editing your .profile file, there are several options. For the seasoned veteran, editing this file is simply a matter of dropping to a shell, editing in vi, and :wq’ing. There is the pico editor which, for a command line editor, is a little friendlier than vi. For the majority of users, editing a text file is warmer and fuzzier using a GUI text editor like TextEdit.

The problem is that files starting with a period are hidden from listings in the Finder windows, so trying to find a hidden file to open using TextEdit will not get you very far. While many third party editors provide options for opening hidden files, if you don’t have one installed, you can easily open these hidden files using TextEdit which is a part of OS X.

To open your .profile file, for example, start the Terminal application (searching for ‘terminal’ using Spotlight and clicking on the Terminal application is an easy way to do this). Since Terminal will put you in your home directory by default and .profile is in your home directory, you can edit .profile simply by typing:

open .profile

If the file you want to edit is in another directory, you’ll need to cd into that directory first or specify the full path name in front of the filename.

The open command used above uses the same mechanism to open a file using a default application that the Finder does when clicking on a file. If for some reason the default application for the file you are trying to edit has changed to something that doesn’t work for editing, you can force open to use TextEdit by adding the -a option:

open -a TextEdit .profile

Make your changes to the file and save it and you’re done. One compulsory note of caution: hidden files are often hidden for a reason. They tend to hold configuration information that, if incorrectly changed, could cause one or more applications to misbehave. Tread lightly and make backups before changing.



seal 2010-04-27 23:06 发表评论
]]>
NuFile - 在Finder中通过右键菜单来新建文?http://www.aygfsteel.com/sealyu/archive/2010/04/27/319424.htmlsealsealMon, 26 Apr 2010 22:43:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319424.htmlhttp://www.aygfsteel.com/sealyu/comments/319424.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319424.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/319424.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/319424.htmlq个Y件叫NuFile 。把q个软g下蝲下来后,可以打开文gq行安装。安装很单,一?#8220;l箋”可以了。安装完毕后Q我们进?#8220;pȝ偏好讄”Q就?x)发现?#8220;其他”那一? 中,出现了NuFile的配|?/p>

pȝ偏好讄-2.png

q入NuFile的配|页面,我们可以讄在右键菜单上可以新徏哪些文g。NuFile支持 的文件类型很多,包括文本文g、Java文g、PHP和Officepd。你q可以增加新的文件类型?/p>

NuFile.png

配置完毕后,我们?a title="http://mac.linsheng.me/?p=253" target="_blank">FinderH口中的右键菜单 中,可以新建文件了?/p>

nufilemenu.png


seal 2010-04-27 06:43 发表评论
]]>
Finder Tip: 获取/复制文g或文件夹完整路径Q{Q?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/04/27/319422.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Mon, 26 Apr 2010 17:50:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/04/27/319422.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/319422.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/04/27/319422.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/319422.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/319422.html</trackback:ping><description><![CDATA[<div> <p><strong>1. 用Terminall端E序</strong>:<br /> 打开TerminalH口, 用鼠标把要获?复制的文件或文gҎ(gu)攑ֈTerminalH口? 当看到有个绿色加号出现时, 攑ּ鼠标, 文g的完整\?full path)?x)在命o(h)行显C出? q可复制_脓(chung)到其它地? </p> <p><strong>2. 用TextEdit</strong>:<br /> 打开TextEdit应用E序, 按下”shift-command-T”或在Format菜单下选Make Plain Text, 使其转换为纯文本格式. 用鼠标把要获?复制的文件或文gҎ(gu)攑ֈTextEditH口? 当看到有个绿色加号出现时, 攑ּ鼠标, 文g的完整\?full path)?x)显C出? q可复制_脓(chung)到其它地?</p> <p><strong>3. 用关联菜单插?/strong>:<br /> 比如<a >FilePathToClipCMPlugin</a>?a >FileUtilsCM</a>, 都是免费? </p> </div> <img src ="http://www.aygfsteel.com/sealyu/aggbug/319422.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-04-27 01:50 <a href="http://www.aygfsteel.com/sealyu/archive/2010/04/27/319422.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MAC 昄隐藏文g的方法(转)http://www.aygfsteel.com/sealyu/archive/2010/04/27/319421.htmlsealsealMon, 26 Apr 2010 17:30:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319421.htmlhttp://www.aygfsteel.com/sealyu/comments/319421.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/04/27/319421.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/319421.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/319421.html

打开“l端”Q输入以下代码:(x)

defaults write ~/Library/Preferences/com.apple.finder AppleShowAllFiles -bool true

然后重启 Finder 卛_Q重起Finder有多U方法,最单的Ҏ(gu)是Q?/p>

同时按住Control + Option键,然后点击Dock左边的Finder图标Q这个时候菜单最下面׃(x)出现重新打开Finder的链接。另外还可以同时按住Option + Command + ESC三键打开强制退出应用程序对话框Q在里面关闭Finder之后QFinder?x)在关闭之后自动重新打开?/p>

恢复隐藏的代码:(x)

defaults write ~/Library/Preferences/com.apple.finder AppleShowAllFiles -bool false



seal 2010-04-27 01:30 发表评论
]]>
վ֩ģ壺 Ϫ| | ʳ| | | | | | | | | ³ľ| | | | ͨ| ʡ| ÷| | ²| | | ױ| ˫| | п| Դ| Ԫ| | | | ƴ| | Ұ| | ̫ԭ| | | | ɽ| ޶|