Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Gets string and length and return string of given length. Makes sure half word in not in the end.
0
1529
posted 15 years ago by nilambar
source: http://corlan.org/2010/08/30/about-air-android-permissions/
1
4385
posted 15 years ago by BoNzO
Adds support for excerpts in WordPress pages. Great for using WordPress as a CMS. A text field appears in the admin panel and you can pull the excerpt from your template files (for teaser texts etc.)
0
1771
posted 15 years ago by hussong
Was trying to figure out a way to remove tabs for a content type where it was unnecessary. Place this in your theme template.php file and configure to your needs.
Example Usage: Organic Group View is created and page uses a menu tab. Unfortunately...
0
1958
posted 15 years ago by Onfire60
for auto increment ids, when you delete records this will reset the number for the next auto id.
0
1846
posted 16 years ago by matula
This just replaces the default value of a form element. Then it bring it back if you click away.
1
1769
posted 16 years ago by gera3d
Stop a spam email form header injection attack - ie stop spammers from hijacking a web form to send junk mail
0
1576
posted 16 years ago by flatearthcomms
When creating a custom Google Map, the latitude and longitude for the place of interest are needed. Enter in the Address, City, and State, and the lat and lng pair will be returned.
4
3473
posted 16 years ago by tcam27
This code is pretty simple but massively useful. You can select any number of elements on the stage in Flash, then run this JSFL Command and it will round their x and y values to the nearest whole number. It's very handy when you want things to be on...
1
1954
posted 16 years ago by jknight42
Be sure to change all Audio references to the corresponding window title in your language. This script switch the default audio device in Windows 7 to the second audio device, in my case the Headphones. You can add one or more Send, {Down} statements...
1
4233
posted 16 years ago by harrison3001
I use this bash oneliner all the time to recursively search for a string in large codebases. I use it when searching for mentions of tables, databases, function definitions, function calls etcetera.\r\n\r\nIt searches through a number of file types (...
1
2260
posted 16 years ago by niels_bom