Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
How to retrieve the amount of items the user has into the cart
0
1740
posted 16 years ago by TioSolid
Will convert all of the mysql dates on the page to be localized.
0
1933
posted 16 years ago by yisreldov
Add and remove www to urls through .htaccess with mod_rewrite
1
2306
posted 16 years ago by ginoplusio
Redirects all calls to mp3 files to a proxy (usefull fr example to track stats on db) the +FollowSymlinks should be already setted, but if it isnt' this setting with use it. FollowSymlinks must be on to use the rewrite engine.
0
3878
posted 16 years ago by ginoplusio
This creates a zipfile with the same name as the input file in the same location as the input file. Only does a single file.
0
2121
posted 16 years ago by throb
validate :price_must_be_at_least_a_cent
protected def price_must_be_at_least_a_cent
errors.add(:price, 'should be at least 0.01') if price.nil? || price < 0.01
end
0
1780
posted 16 years ago by stayce
Finds the location of the log and data files for every database in SQL Server
1
1970
posted 16 years ago by tcphll
Just a simple benchmark utility, working both in AS2 & JS.
0
1529
posted 16 years ago by irrevokable
I love creating simple little extension methods like these to improve code readability.
1
2120
posted 16 years ago by mattcasto
I love creating simple little extension methods like this to make my code read more better.
0
1660
posted 16 years ago by mattcasto
PHP
Wordpress - Show link to the next and previos brother of the current page, and a link to the page parent
Must be placed after the_post()
1
5108
posted 16 years ago by Overdeath
Must be placed after the_post() so make sure you verify that if you place it in the sidebar.
0
2860
posted 16 years ago by Overdeath