Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This will get the 11-character YouTube video ID from any valid YouTube URL.
Based on http://snipplr.com/view/57065/get-youtube-video-id/ but made more robust to handle additional URL inputs
0
3895
posted 14 years ago by jmiller
Condition = The condition which must be met.
True = Executed if the condition is met.
False = Executed if the condition failes.
0
1878
posted 14 years ago by beneberle
This is the Batch API example shown on http://api.drupal.org/api/drupal/developer--hooks--install.php/function/hook_update_N/6.
1
2079
posted 14 years ago by wizonesolutions
then in your template code you just use..
echo excerpt(25);
1
1770
posted 14 years ago by Omegakenshin
.htaccess snippets to optimize your website in many ways: Redirections, performances, ease of use
2
4223
posted 14 years ago by macodev
This script get (in the correct tree folder structure) all files changed between 2 revisions.
NOTICE: This scripts does not advice about files deleted
0
3113
posted 14 years ago by isholgueras
While django provides the django_admin.py cleanup script, if sessions get out of control sometimes you have to go lower level to get everything cleaned up. If the problem gets out of hand and you hit the resource limits of the machine, it is very dif...
0
4675
posted 14 years ago by magicrebirth
Register a Custom Post Type and a Custom Taxonomy in Wordpress
0
2361
posted 14 years ago by i-am-andy
Sorts a list by its 'data-' attribute. Customization is very easy.
0
2206
posted 14 years ago by inreflection7
Search for a string, if matched replace with second provided paramater. Third parameter is the variable whose value is the string you'd like to search.
0
2125
posted 14 years ago by inreflection7
Query to find the most recent logins for a particular user ( find 1 years worth )
0
2136
posted 14 years ago by theonlyalterego
Metadata of Playing Media
*iOS5 Only*
Use this for integration with Accessories and Apple TV
0
2966
posted 14 years ago by ppaulojr
Batch script creates repository dump of specific project in repository. It assumes that repository has following structure:
/project1
/trunk
/tags
/branches
/project2
/trunk
/tags
/b...
0
4271
posted 14 years ago by altern
Batch script creates initial svn repository structure according to SCM framework (http://scm.altern.kiev.ua):
/project
/trunk
/tags
/builds
/PA
/A
/B...
0
4207
posted 14 years ago by altern
Wordpress by default wraps images in <p> tags, this kills that.
3
2494
posted 14 years ago by rliverman
'svn add' all unversioned files in a working copy to svn repository recursively on windows
0
4440
posted 14 years ago by altern
If the image source is not in the database a default image is displayed.
0
2786
posted 14 years ago by blantonious
Better way of generating date in ISO 8601 format (e.g. "2011-12-12T20:50:22+0100").
Needs to require [clj-time.core :as time] and [clj-time.format :as time-format].
0
4957
posted 14 years ago by ef
Ever want to filter out a category from your blog page. Here's how you do it! Just add this snippet to your functions.php file.
0
1831
posted 14 years ago by goatboy91587
Simple script utilising the `gpg_encrypt.php` code (`http://business-php.com/opensource/gpg_encrypt/`) that will encrypt both the body and attachment of an email on upload.
0
3470
posted 14 years ago by davo