Welcome To Snipplr


Everyone's Recent Snippets Tagged file



By default, Emacs displays on the titlebar (I mean GUI Emacs) emacs@domain. There is a way to modify this, using (setq frame-title-format "my title"). How to display emacs@domain: ~/dir/file (or buffer name in case of e.i. *scratch*)? Add it to yo...
1 3508 posted 17 years ago by coldpeer
4 1788 posted 17 years ago by iTony
Reading the contents of a whole file as a string.
0 3460 posted 17 years ago by jarnaldich
got this as part of an example on the adobe cookbook site
1 1938 posted 17 years ago by mswallace
1 1512 posted 17 years ago by neil
count .htm or .html files in the directory. use ls and grep command.
1 1476 posted 17 years ago by kyokutyo
Often times it is nice to add some text after a link on your website to let your users know whether the link goes to a PDF and how large that PDF file is. I've found that manually doing this works but after awhile when that PDF file get updated, the...
2 1946 posted 17 years ago by neal_grosskopf
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 1459 posted 17 years ago by cczona
This snippet shows you how to limit the download rate of a file download.
18 11348 posted 17 years ago by localhorst
2 1516 posted 17 years ago by gbot
Removes diacritics from file name before adding it to the archive. Archive file name retains diacritics.
0 2695 posted 18 years ago by karelklic
Very basic but I use various variations all the time.
0 3072 posted 18 years ago by karelklic
Example of serializing a lisp variable.
0 3386 posted 18 years ago by jarnaldich
0 1775 posted 18 years ago by zingo
Difficult to find in documentation but so easy
3 2781 posted 18 years ago by arnoldu
0 1785 posted 18 years ago by coggla
In response to a very simplistic solution suggestion using Shell, here is a basic version of what I use. The advantage of the solution below is that it is supposed to be much faster on directories with many files (I regularly use its full-blown versi...
0 1426 posted 18 years ago by amosshapira
Running this command will append a line with given values to a file you specify. Replace words between < and > with the values you desire.
1 2060 posted 18 years ago by engel
A one-liner to remove any temporary files modified over one day ago. Removes files from /tmp/ Run without the '-exec rm {} \;' part to check that it is matching the right set of files - this can be dangerous if run by root! If you want to remove fi...
1 1721 posted 18 years ago by wolfie
The original code was meant to be used with register_globals=on. If you cannot or don't want to turn that on, then I have modified the code to work with register_globals=off.
4 1891 posted 18 years ago by Jaymoon
Shows reading a file bundled with a Sun SPOT application. The file, called winners.txt contains the following 2 lines: Walker Griffin ----------------------------------------------------------- The output would include: NameOfFile=/winners.txt...
0 1321 posted 18 years ago by javapda
Found this code. It is an example of loading and reading different file types with ActionScript 3
5 2399 posted 18 years ago by mswallace
1 1967 posted 18 years ago by nicolaspar
2 1293 posted 18 years ago by kotnik
Simply replaces the div's innerHTML with the response text received from the file.
3 2785 posted 18 years ago by 1man
Basic layout for the data contained in a JSON file.(JavaScript Obsect Notation).
1 1401 posted 18 years ago by 1man
0 1352 posted 19 years ago by olive
This (almost) one-liner cascades into all subdirectories and deletes the files first, then the directories. Makes deleting a directory really easy. This was originally posted by John Wilson into the Groovy user list.
2 2575 posted 19 years ago by hansamann