cczona


Member since 12/15/2007

42 snippets

3767 profile views

2 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

cczona's Recent Snippets



« Prev 1 2
From the Pickaxe, 4th edition, p. 352: A rescue clause with no parameter is treated as if it had a parameter of StandardError. This means that some lower-level exceptions will not be caught by a parameterless rescue class. If you want to rescue ev...
1 617 posted 12 years ago by cczona
See also http://www.gnu.org/software/bash/manual/bashref.html#Bindable-Readline-Commands for the standard bindings and more detailed explanation of what they do.
0 737 posted 12 years ago by cczona
[See also: http://snipplr.com/view/12048] Oops, didn't mean to commit that? Undo it easily:
0 575 posted 13 years ago by cczona
Examples borrowed from http://ubuntuforums.org/showthread.php?t=966877 (comment 3)
0 627 posted 13 years ago by cczona
requires swftools
0 693 posted 13 years ago by cczona
The 'request' and 'response' objects are chock full of useful info. But console can't usually access them. Here's how: start the server with the -u option, insert a breakpoint where you would like to have access to the controllers/helpers/etc. Wh...
1 763 posted 15 years ago by cczona
[See also: http://snipplr.com/edit/45271] Oops, didn't mean to commit that? Undo it easily:
0 544 posted 15 years ago by cczona
'port install ruby' sometimes results in malloc errors near the final phase (just after destroot completes). It appears that macports may be out of memory while installing documentation.
0 502 posted 15 years ago by cczona
Suppose you created a script chart.rb in /home/foo/ruby/mylib direcory. Now, you want to use this in the app.rb located in /home/foo/ruby/scripts. In ~/.bash_profile:
0 527 posted 15 years ago by cczona
Changing default settings The defaults for the ssh-related commands can be altered for each account in a configuration file ~/.ssh/config (there is also a system-wide file, usually /etc/ssh/ssh_config). Each entry starts with a Host keyword. You c...
0 559 posted 15 years ago by cczona
Check out the bash command 'shopt -s cdable_vars' From the man bash page: If set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to.
0 538 posted 16 years ago by cczona
(EDITED: Originally I had this snip using 'cat /proc/version'. But have since replaced it with a more reliable -- and specific -- method) If you need still more info (or are on a BSD), see 'uname', 'dpkg-architecture'
1 526 posted 16 years ago by cczona
If Ubuntu Server fails to resolve hostnames or find a network connection via Parallels 3 bridged networking, it may be attempting to use the wrong network interface.
0 563 posted 16 years ago by cczona
Note: most of these will be available to the shell and Rails' console too.
2 701 posted 16 years ago by cczona
"When using haml, an HTML tag is represented using %tagname, but in the case of an HTML tag with attributes, the representation is %tagname{:attribute => value}. It turns out there must be no whitespace between %tagname and {:attribute => value}....
1 580 posted 16 years ago by cczona
"The new naming scheme for template (eg. .html.erb) does not seem to work for partials. When using :partial => 'form' a filename "_form.html.erb" is not recognized. " Rails now requires the partial to be referenced by dotted format
1 610 posted 16 years ago by cczona
Note that the comment is part of the code here. IE 5+ (including Mac) will evaluate to true by using conditional compilation.
0 620 posted 16 years ago by cczona
See also p. 348 ("Invoking a Method") of Pickaxe 2nd edition
1 589 posted 16 years ago by cczona
IE7 and IE8 support “No Add-ons Mode,” a troubleshooting mode. When you run IE this way, no 3rd party code runs... You can start No Add-ons Mode in a few ways: (To exit No Add-ons Mode, simply close that browser window.)
0 651 posted 16 years ago by cczona
*"Only the elements which are are selected through the $ selector will get the extra DOMAssistant methods added to it."
0 461 posted 16 years ago by cczona
Following a
2 587 posted 16 years ago by cczona
This is handy for testing, when you need to simulate an open file or open URI. Why, and the Pickaxe book, have better examples
1 595 posted 16 years ago by cczona
« Prev 1 2