Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
REXML does not seem to have a 'lang' method, which is strange since lang is in the XML 1.0 Specification §2.12 'Language Identification', and in many other libraries. Because of Ruby's 'monkey patching', it's pretty easy to add - you just recursivel...
1
1222
posted 17 years ago by tommorris
Allow for easier editing of content by users who didn't make the site.
1
1324
posted 17 years ago by EvanL
Test-first programming, in which you write the unit tests first with the unittest module and then work on the code until it passes all the tests, seems like a good substitute for writing interfaces or documentation first. The unit tests are like an A...
0
1515
posted 17 years ago by chombee
This example shows how to compile the hello.c file out of the fuse source tar.
0
1279
posted 17 years ago by narkisr
By the legendary abigail. Fails to match if and only if it is matched against a prime number of 1's. That is, '11' fails, but '1111' does not.
I once heard him talk why this works, but I forgot most of it.
3
1869
posted 17 years ago by banzaiman
I made this simple JavaScript to save me time. I was sick of having to thumb-bash on a tiny keypad or login to the slow Clickatell site and use their clunky interface (nothing it simpler than 2 text boxes and an OK button).
You will need an HTTP A...
1
1516
posted 17 years ago by mountainash
Loads the contens of a dir an sorts them by the date of creation.
2
2127
posted 17 years ago by romanos
Using this convention, you can override any system table setting.
1
1463
posted 17 years ago by shrop
https://www.chrisjmendez.com/2008/06/11/show-hidden-folders-and-files-in-os-x-leopard/
2
1773
posted 17 years ago by chrisaiv
https://www.chrisjmendez.com/2008/06/11/how-to-use-ems-when-youre-already-comfortable-with-pixels/
2
1478
posted 17 years ago by chrisaiv
This is my implementation of the messager pattern used by Panda3D for event
handling. It's a really nice idea but I think Panda's version is implemented
weirdly, it uses the subscribe objects as keys in the dictionary. That means
that if you want...
0
1272
posted 17 years ago by chombee