$ command line ruby cheat sheets
Cheat Sheet Title: [ no_spaces_alphanumeric_only ]
Cheat Sheet:<command> <shift> L => brings up the firebug console Logging: console.log("message" [,objects]) console.debug("message" [,objects]) console.info("message" [,objects]) console.warn("message" [,objects]) console.error("message" [,objects]) Assertions: console.assert(a, "message" [,objects]) console.assertEquals(a, b, "message" [,objects]) console.assertNotEquals(a, b, "message" [,objects]) console.assertGreater(a, b, "message" [,objects]) console.assertNotGreater(a, b, "message" [,objects]) console.assertLess(a, b, "message" [,objects]) console.assertNotLess(a, b, "message" [,objects]) console.assertContains(a, b, "message" [,objects]) console.assertNotContains(a, b, "message" [,objects]) console.assertTrue(a, "message" [,objects]) console.assertFalse(a, "message" [,objects]) console.assertNull(a, "message" [,objects]) console.assertNotNull(a, "message" [,objects]) console.assertUndefined(a, "message" [,objects]) console.assertNotUndefined(a, "message" [,objects]) console.assertInstanceOf(a, b, "message" [,objects]) console.assertNotInstanceOf(a, b, "message" [,objects]) console.assertTypeOf(a, b, "message" [,objects]) console.assertNotTypeOf(a, b, "message" [,objects]) Measurement: console.trace() console.time("name") console.timeEnd("name") console.count("name") String Formatting: %s string %d,%i,%l,%f number %o link to inspector %1.o interactive table of properties %.o array of property names %x XML %N.x XML with N levels expanded Command Line: $("id") document.getElementById() $$("css") array of elements matching css selector $x("xpath") array of elements matching xpath $0 last inspected object $1 next-to-last inspected object $n(N) N-th from last inspected object inspect(object) display object in inspector dir(object) array of property names for object clear() clear console http://www.joehewitt.com/software/firebug/
Your cheat sheet will be editable (fixable) by anyone. Each cheat sheet is essentially a wiki page. It may also be used by millions of people for reference purposes from the comfort of their command line. If this is okay with you, please save.
Advertisement