惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News | PayPal Newsroom
Application and Cybersecurity Blog
Application and Cybersecurity Blog
O
OpenAI News
S
Security @ Cisco Blogs
宝玉的分享
宝玉的分享
Hacker News: Ask HN
Hacker News: Ask HN
T
Troy Hunt's Blog
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Latest news
Latest news
NISL@THU
NISL@THU
S
Security Affairs
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
AI
AI
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
小众软件
小众软件
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
AWS News Blog
AWS News Blog
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
I
InfoQ
Schneier on Security
Schneier on Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
The Exploit Database - CXSecurity.com
IT之家
IT之家
T
Threatpost
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
N
News and Events Feed by Topic
L
LINUX DO - 最新话题
F
Full Disclosure
大猫的无限游戏
大猫的无限游戏
H
Heimdal Security Blog
S
SegmentFault 最新的问题

David Baron's Weblog

Software engineering, responsibility, and ownership Software engineering, responsibility, and ownership David Baron's weblog: Security and Inequality Running animations on the compositor thread David Baron's weblog: Tying ecosystems through browsers David Baron's weblog: Payments on the Web Thoughts on migrating to a secure Web David Baron's weblog: The need for government David Baron's weblog: Priority of constituencies How browser developers should seek feedback from Web developers A possible approach to shorter release cycles David Baron's weblog: Fifteen years Why debug builds (and assertions) are important Ten years of the Mozilla Foundation Open licensing at the W3C Why adding compositing and blending to CSS is harder than it looks How you can help with removing -moz- prefixes Moving bug history out of the primary display of a bug report Beware of locale-specific behavior in the C library Eating dogfood and shipping software Specification style and the future of the Web The bug system I wish I had CSS border-image changes and unprefixing Improving font size readability on Firefox for Android David Baron's weblog: CSS Animations, part 2 Hue-preserving color inversion with SVG filters Changes to handling of @-moz-keyframes David Baron's weblog: window.matchMedia() David Baron's weblog: CSS Animations What does a blur radius mean? Crash analysis in the future David Baron's weblog: calc() David Baron's weblog: colorDepth David Baron's weblog: Hidden complexity in specifications The most important field in a bug report: the summary WOFF font format submitted to W3C David Baron's weblog: :-moz-any() selector grouping setTimeout with a shorter delay Faster repainting in SVG foreignObject David Baron's weblog: Distributed Extensibility David Baron's weblog: Broadening crash analysis Correlating crashes with binary extensions or plugins David Baron's weblog: ex-HTML Downloadable font formats for the Web Web Accessibility as a Political Movement David Baron's weblog: CSS priorities David Baron's weblog: Bug priorities David Baron's weblog: Semi-vacation Some new CSS features in Firefox 3 David Baron's weblog: New selectors David Baron's weblog: The age of bugs Seeking a good Linux distribution David Baron's weblog: Teaching to the test David Baron's weblog: March 2008 David Baron's weblog: February 2008 David Baron's weblog: January 2008 David Baron's weblog: October 2007 David Baron's weblog: September 2007 David Baron's weblog: August 2007 David Baron's weblog: June 2007 David Baron's weblog: April 2007 David Baron's weblog: March 2007 David Baron's weblog: January 2007 David Baron's weblog: September 2006 David Baron's weblog: August 2006 David Baron's weblog: July 2006 David Baron's weblog: May 2006 David Baron's weblog: February 2006 David Baron's weblog: January 2006 David Baron's weblog: December 2005 David Baron's weblog: October 2005 David Baron's weblog: September 2005 David Baron's weblog: June 2005 David Baron's weblog: April 2005 David Baron's weblog: March 2005 David Baron's weblog: February 2005 David Baron's weblog: October 2004 David Baron's weblog: September 2004 David Baron's weblog: August 2004 David Baron's weblog: June 2004 David Baron's weblog: May 2004 David Baron's weblog: April 2004 David Baron's weblog: March 2004 David Baron's weblog: February 2004 David Baron's weblog: January 2004 David Baron's weblog: November 2003 David Baron's weblog: October 2003 David Baron's weblog: September 2003 David Baron's weblog: August 2003 David Baron's weblog: July 2003 David Baron's weblog: June 2003 David Baron's weblog: May 2003 David Baron's weblog: April 2003 David Baron's weblog: March 2003 David Baron's weblog: February 2003 David Baron's weblog: January 2003 David Baron's weblog: December 2002 David Baron's weblog: November 2002 David Baron's weblog: September 2002
David Baron's weblog: May 2005
David Baron · 2005-05-25 · via David Baron's Weblog

Some bash functions for Mozilla development (00:29 -0700)

I figured I'd share a few bash functions that I find useful for Mozilla development. There are only a handful of people in the world who care about this stuff, and this entry is for them. The rest of you can feel free to ignore it.

For a start, there's this one that's useful when I need to revise the IID of “interfaces” that aren't defined in IDL:

uuidgen-c++()
{
        local UUID=$(uuidgen)
        echo "// $UUID"
        echo "#define NS__IID \\"
        echo "{ 0x${UUID:0:8}, 0x${UUID:9:4}, 0x${UUID:14:4}, \\"
        echo -n "  { 0x${UUID:19:2}, 0x${UUID:21:2}, 0x${UUID:24:2}, "
        echo -n "0x${UUID:26:2}, 0x${UUID:28:2}, 0x${UUID:30:2}, "
        echo "0x${UUID:32:2}, 0x${UUID:34:2} } }"
}

It saves the manual typing involved in splitting up a generated IID.

But the more interesting one is the way I deal with my many mozconfig files. First of all, I have them all in a directory, ~/mozilla/mozconfig/. But then I have the following bash function to switch between them:

moz()
{
        local FILE=~/mozilla/mozconfig/$1
        if [ ! -f $FILE ]
        then
                echo "Error: $FILE does not exist." 1>&2
                return 1
        fi
        export MOZCONFIG=$FILE

        if [ -d ../obj -a ! -d ../obj/$1 ]
        then
                echo "Warning: Will create new objdir" 1>&2
        fi
}

My ~/.bashrc file contains a call to this function too, moz firefox-debugopt, so that my MOZCONFIG environment variable is never unset, so I can't accidentally do a srcdir build (horrors, never mind the damage to that source tree).

Since many of my build options are in common, I have the various files include other files. For example, my ~/mozilla/mozconfig/firefox-debug contains the lines:

. $(dirname $MOZCONFIG)/common
. $(dirname $MOZCONFIG)/common-debug
. $(dirname $MOZCONFIG)/common-gtk2+xft

which allow sharing of common bits of configuration. This part didn't have to depend on the fact that I'm always using mozconfigs via the MOZCONFIG environment variable to allow my MOZCONFIG files. However, the next bit does. The trick I use in ~/mozilla/mozconfig/common to ensure that I never accidentally create a MOZCONFIG file that will build in the wrong object directory is this:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj/$(basename $MOZCONFIG)/

which ensures that whenever I do a build with one of my mozconfig files, it will always end up in an object directory based on the name of that mozconfig file.

This way of dealing with mozconfig files has made it a lot easier for me to deal with the combination of multiple source trees and multiple build configurations for each tree.

San Francisco (00:05 -0700)

Last Saturday I went up to San Francisco and did a little hiking. Believe it or not, there are some worthwhile places to hike within city limits (I'm a big fan of both Golden Gate Park and Lincoln Park). I took some photographs of the Golden Gate Bridge from Lincoln Park, including this one, which is a view of the bridge from the ocean side:

[Photo of Golden Gate Bridge from Lincoln Park]