Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
You'll need to download the latest version of jQuery for this to work, as it is linked in the tag. CSS/XHTML included.
15
3885
posted 17 years ago by dmosher
https://www.chrisjmendez.com/2008/06/04/ruby-open-a-text-file-and-re-write-its-contents-into-a-new-text-file/
1
1649
posted 17 years ago by chrisaiv
This rendition works for most of my tasks, but the inform may need to be changed to suit base64 encoded files.
0
1353
posted 17 years ago by breakerjump
Example code would remove all files/folders recursively starting from the current folder named file_name
0
1302
posted 17 years ago by jturmel
Some times you need some specific range of lines from a file and the commands 'head' and 'tail' are not enough for you. This could be a easy solution for this problem.
2
1793
posted 17 years ago by Juanje
Sorry, the comentaries are in spanish. I will translate them some day.
The examples results are indicated with:
# -> [result]
Usually is the "echo" result
0
1022
posted 17 years ago by Juanje
Convert an number to a position / ranking. 1 becomes 1st, 2 becomes 2nd, etc...
2
1984
posted 17 years ago by distinctdev
This snippet shows how to serialize action script object to strings, the serialization method is AMF based, note also that each object must meet three basic rules in order to be serialized properly:
¨1. The constructor must take no arguments...
1
1786
posted 17 years ago by narkisr
I use this code to place in blocks or pages to show a link to the user registration page if the user is not currently logged in. An example is a block I have setup on the home page of http://www.lightentheload.net. If the user is logged in, the block...
0
1252
posted 17 years ago by shrop
Recursively SVN rename (move) all thtml-files to ctp-files . Fires this up in CakePHPs /views path.
0
1504
posted 17 years ago by zingo