Welcome To Snipplr


Everyone's Recent Ruby Snippets



1 ... 4 5 6 7 8 ... 12
I had a directory tree with around 4000 pdf files and I needed a page count - so I semi-rolled this. I swiped the counter code from the gem README: http://github.com/yob/pdf-reader/tree/master It could be more contained - as is I run it from irb:...
1 465 posted 13 years ago by inkdeep
3 366 posted 13 years ago by dbug13
1 264 posted 13 years ago by paramah
2 333 posted 13 years ago by paramah
2 263 posted 13 years ago by Krypt
Select text Right-click, select "Filter through command..."
1 293 posted 13 years ago by reedelrub
Rake task - Copies files from one directory to another in a batch of 50 files, giving 15 seconds break between each batch.
1 371 posted 13 years ago by cnicolaou
I needed a quick way to unescape a URL Encoded string. I found 2 chill ways
2 320 posted 13 years ago by chrisaiv
http://www.sitepoint.com/forums/showthread.php?t=552741
1 341 posted 13 years ago by chrisaiv
Example of how to use a cron like a daemon and avoid having the cron run two instances of the same script.
1 270 posted 13 years ago by jnunemaker
Simple Outlook automation, the idea is to use this in cygwin to send files without opening the outlook UI, to use it place the code under /bin folder and make it executable with chmod +x.
2 322 posted 13 years ago by narkisr
If you get "JPEG marker not found!" error when you try to open an image file you must read it in binary mode.
1 298 posted 13 years ago by PixelMin
2 315 posted 13 years ago by pmd
2 384 posted 13 years ago by pmaciver
1 319 posted 13 years ago by pmaciver
1 316 posted 13 years ago by pmaciver
1 241 posted 13 years ago by sunfjun
1 266 posted 13 years ago by marouanomezzine
英語のタイトルが適当な英訳なので、誰かOK/NGを教えてください。
1 371 posted 13 years ago by octech
1. Make sure the following environment variable is set: WinXP: HOME=C:\Documents and Settings\*username* Vista: HOME=C:\Users\*username* 2. Create an .irbrc file in %HOME%: $ cd %HOME% $ touch .irbrc If you don't have...
1 341 posted 13 years ago by charlesroper
Matches single line Javascript (and PHP, etc.) comments
1 324 posted 13 years ago by mikegreen
1 ... 4 5 6 7 8 ... 12