List of bookmarklets for mobile debugging

List of bookmarklets for mobile web debugging

Posted on July 4, 2011 by Shi Chuan

Although we can’t install Firebug or ySlow on iPhone for mobile web front-end debugging, but every cloud has a silver lining, here is a list of bookmarklets come to the rescue.

Firebug Lite Stable – this is the main distribution channel. The Stable Channel is updated with features and bug fixes once they have been properly tested in the Beta channel.

Firebug Lite Debug – the Debug channel uses the same version as the Stable channel but with different pre-configurations to make it easier to debug Firebug Lite itself.

Firebug Lite Beta – the Beta channel is where the new features and fixes are polished. It should be considerably stable (no known regression), but it may contain some bugs and some features may be incomplete.

Firebug Lite Developer – the Developer channel is where the ideas get created and tested. Once it is tied directly to our code repository you’ll get the most recent code possible and will receive updates much more frequently than other channels. At the other hand, the Developer channel can be very unstable at times and the initial load can be slower.

YSlow for Mobile/Bookmarklet – YSlow for Mobile works as a bookmaklet. Users can now run the equivalent of regular YSlow in Mobile browsers as well as any bookmarklet enabled desktop browsers.

Mobile Perf bookmarklet – a cool mobile bookmarklets ‘boilerplate’ by Steve Sounder

How to use these?

They all work more or less the same way. For those that don’t have a clear instruction on how to use. Here is a step by step instruction that can be applied to all these bookmarklets: http://stevesouders.com/mobileperf/iphonesteps.php

Got a better one?

All of these are now listed on Mobile Boilerplate’s wiki section, if you know a better one, feel free to add to the list. https://github.com/shichuan/mobile-html5-boilerplate/wiki/Mobile-Bookmarklets

通过List of bookmarklets for mobile debugging | Shi Chuan’s blog.

HTML entities in numeric order

Named HTML entities in numeric order

Below are the entities listed in numeric order with definition and ISO numeric code. CSS ‘content’ does not accept named entities or regular numeric entities such as @, but does render ASCII text and unicode.

If you want to replace the bullets in a bulleted list with a different character, perhaps a ♥ or · you would need to use the unicode entity rather than the named or numeric entity: use the hexadecimal entity.

li:before {content:”\2665″; text-indent: -10px;}

JavaScript Special Characters / Entities

If you want to include characters in JavaScript, the process is very similar to the CSS inclusion method, except : in JavaScript use octal-encoded characters without a preceding 0 instead of the HTML entity for the normal chars, and the hex character preceded by a \u for all other characters..

alert(‘M\351nage \340 trois.’)

通过» Javascript, CSS, and (X)HTML entities in numeric order :: CSS, JavaScript and XHTML Explained.

Subversion Basics

 

Subversion Basics

In order to use these commands the following lines need to be added to /etc/bashrc on the machine that will access the repository:
export svnroot=svn+ssh://cvs.msc.tamu.edu/home/svn
export SVN_SSH="ssh -l $USER"

If you are intending to operate as root use su instead of su -

Common svn commands

Command Action
svn co $svnroot/project/trunk targetdir Checks out the trunk of the project into the targetdir.
also checkout
svn ci [filename] Commit the changes to the working copy or filename. VIM will be launched allowing you to enter a meaningful log message.
also commit
svn up Bring the current working copy up-to-date with the repository. Merges any changes in the repository with the working copy.
svn resolved Sometimes a merge or update will have a conflict. Files will be produced which share part of the filename with the conflicted file. Use those files and information inserted into the conflicted file to put the file in a workable state and use this command to let subversion know you fixed the problem. Then commit.
svn merge -rBASE:PREV [target] Reverts target back to the previous revision in a way that may be committed. PREV may be any previous revision number. This is only one small use of the merge command. See the next command for a more efficient operation.
svn cp -r489 $svnroot/project/trunk/target ./target Copies the target file or directory to the working copy with history from revision 489.
svn st Check the status of the working copy
also stat, status
svn diff [filename] Displays an inline diff of all the modifications to the working copy or to filename.
also di
svn revert target [target] Reverts targets back to a pristine copy of the repository. target may be . * or any filename.
svn cp file newfile Make a (cheap) copy of file.
also copy
svn mv file newfile Move or rename file to newfile.
also move, ren, rename
svn cp $svnroot/project/trunk $svnroot/project/tags/1.0

svn cp . $svnroot/project/tags/1.0

Tag version 1.0 of the project
1) from the current revision of the trunk.
2) from the current working copy.
In both cases the wc will not point to the new tag. (see svn sw)
svn cp $svnroot/project/trunk $svnroot/project/branches/experimental Branch the current revision of the trunk into the experimental branch.
The working copy will not point to the new branch. (see svn sw)
svn sw $svnroot/project/branches/experimental Switches the working copy to the experimental branch.
svn export $svnroot/project/tags/1.0 product Put a pristine copy of version 1.0 without administrative directories (no committing) into the product directory.

External Scripts

Command Action
svnchangesince Displays the log messages of all the changes to the repository since your last update
svnlastlog Displays the last log message that pertains to the current working copy.
svnlastchange Displays the last log message and a unified diff of the changes made in the last commit
svn-clean Removes all the files and directories that are not in Subversion

通过Subversion Basics.

Linux中PATH设置

Linux中PATH设置

时间:2009-10-25来源:Online990 作者: Online990点击:1051次

PATH的值是一系列目录,当您运行一个程序时,Linux在这些目录下进行搜寻,用以下命令可以设置PATH的值。

 

直接用export命令

在PATH中加入/data/test/hellow.sh脚本,使该脚本能在其他目录下执行。

[root@localhost /]# cd /data/test

[root@localhost test]# ll

总用量 4

-rwx——  1 root root 32 10月 25 13:02 hellow.sh

[root@localhost test]# echo $PATH       #显示$PATH变量

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin

[root@localhost test]# cd /

[root@localhost /]# export PATH=/data/test:$PATH      #在$PATH中加入脚本路径

[root@localhost /]# export|grep test      #查看$PATH

declare -x OLDPWD=”/data/test”

declare -x PATH=”/data/test:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin”

 

修改profile文件

[root@localhost /]# vi /etc/profile

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC    #加入

 

修改.bash文件

[root@localhost /]# vi/root/.bashrc

# .bashrc

# User specific aliases and functions

alias rm=rm -i

alias cp=cp -i

alias mv=mv -i

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

export PATH=”$PATH:/data/test/”

通过Linux中PATH设置 – online990.

Mac OS X Tip: Setting PATH environment variables

Mac OS X Tip: Setting PATH environment variables

I’m still getting to grips with this OS X malarkey, and my latest challenge was how to set the PATH environment variables.

I started out wanting to add some aliases for the mysql and mysqladmin commands as I’ve just decided to have a bit of a play with django. On linux I used to edit my .bashrc file to do this, but the version of bash on Mac OS X (10.5.2) doesn’t seem to support this. Hunting around I realised that I should just add the path to these commands to my PATH environment variable, but again: not quite so simple.

I want these commands to be available to everyone, so it turns out you have to edit a file called paths in /etc:

sudo vi /etc/paths

And that was it. Easy when you know how! Oh, and remember to run vi as root using the sudo command….

通过Mac OS X Tip: Setting PATH environment variables.

Android下修改hosts文件

Android下修改hosts文件

2010年1月24日Suzg发表评论阅读评论

由于某些原因,可能需要指定域名对应的IP地址。Android是基于Linux的系统,与Linux类似,通过hosts文件来设置。

在Android下,/etc是link到/system/etc的,我们需要修改/system/etc/hosts来实现。但是这个文件是只读,不能通过shell直接修改。可以通过连接到PC上使用adb来修改。步骤如下:

1、获得root权限:adb root

2、设置/system为可读写:adb remount

3、将hosts文件复制到PC:adb pull /system/etc/hosts

4、修改PC机上文件

5、将PC机上文件复制到手机:adb push/system/etc/hosts

如果要查看是否修改成功,可以在PC上执行adb shell,运行cat /system/etc/hosts;或者在手机上运行cat /system/etc/hosts。

在Android 1.6系统中,hosts文件格式有一点与PC机Linux不同:不能在一行中一个IP对应多个域名,比如:

127.0.0.1      host1.example.com host2.example.com host3.example.com

在大多PC机Linux系统是合法的,但不能在Android 1.6上起作用,需要拆成每个域名一行才能使用:

127.0.0.1      host1.example.com

127.0.0.1      host2.example.com

127.0.0.1      host3.example.com

通过SuNote » Android下修改hosts文件.

I’d rather be with you – Joshua Radin

http://www.tudou.com/programs/view/4g_KSgxNwOU/
歌词:

Sitting here, on this lonely dock

坐下来,在这孤独的码头上

Watch the rain play on the ocean top

看着雨在大海与天空交界上玩耍

All the things I feel I need to say

我要说出感受到的所有事情

I can’t explain in any other way

但我又不会用其他方法解释

I need to be bold

我要变得勇敢

Need to jump in the cold water

要跳进寒冷的冬天

Need to grow older with a girl like you

要和一个像你一样的女孩度过岁月

Finally see you are naturally

最后看见自然的你

The one to make it so easy

一个让一切变得简单的人

When you show me the truth

当你向我展示真相时

Yeah, I’d rather be with you

嗳,我宁愿和你在一起

Say you want the same thing too

说你也想要同样的东西

Now here’s the sun, come to dry the rain

如今太阳就在这儿,蒸发雨水

Warm my shoulders and relieve my pain

温暖我的肩膀,减轻我的痛苦

You’re the one thing that I’m missing here

我唯一思念的就是你

With you beside me I no longer fear

只有你在我身边,我就不再恐惧

I need to be bold

我要变得勇敢

Need to jump in the cold water

要跳进寒冷的冬天

Need to grow older with a girl like you

要和一个像你一样的女孩度过岁月

Finally see you are naturally

最后看见自然的你

The one to make it so easy

一个让一切变得简单的人

When you show me the truth

当你向我展示真相时

Yeah, I’d rather be with you

嗳,我宁愿和你在一起

Say you want the same thing too

说你也想要同样的东西

I could have saved so much time for us

我本来可以为我们腾出更多时间

Had I seen the way to get to where I am today

我知道自己现在身在何方

You waited on me for so long

你等了我很长时间

So now, listen to me say:

所以现在,听我说:

I need to be bold

我要变得勇敢

Need to jump in the cold water

要跳进寒冷的冬天

Need to grow older with a girl like you

要和一个像你一样的女孩度过岁月

Finally see you are naturally

最后看见自然的你

The one to make it so easy

一个让一切变得简单的人

When you show me the truth

当你向我展示真相时

Yeah, I’d rather be with you

嗳,我宁愿和你在一起

Say you want the same thing too

说你也想要同样的东西

Say you feel the way I do

说你也感受到我所感受的一切

通过I’d rather be with you – Joshua Radin – 麦田音乐网.