This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#item').die('click').live('click', function() { | |
// The code in this block will only attach ONCE. | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _statustext($code = 0) { | |
// List of HTTP status codes. | |
$statuslist = array( | |
'100' => 'Continue', | |
'101' => 'Switching Protocols', | |
'200' => 'OK', | |
'201' => 'Created', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN:VCALENDAR | |
CALSCALE:GREGORIAN | |
VERSION:2.0 | |
X-WR-CALNAME:Water Bill - £20 | |
METHOD:PUBLISH | |
PRODID:-//Apple Inc.//iCal 5.0.1//EN | |
BEGIN:VEVENT | |
UID:26B03B14-B5C3-401B-8F7B-AC76E0208EC5 | |
DTEND;VALUE=DATE:20101002 | |
RRULE:FREQ=MONTHLY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add order suffix to numbers ex. 1st 2nd 3rd 4th 5th | |
* | |
* @param int the number to ordinalize | |
* @return string the ordinalized version of $number | |
* @link http://snipplr.com/view/4627/a-function-to-add-a-prefix-to-numbers-ex-1st-2nd-3rd-4th-5th/ | |
*/ | |
public static function ordinalize($number) | |
{ | |
if ( ! is_numeric($number)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Save this file to /Fuel/app/vendor/Smarty/lib/plugins/function.create_url.php | |
* You can then call it like {create_url url="controller/action"} in your templates. | |
*/ | |
function smarty_function_create_url($params, &$smarty) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#search-input').die('keyup').live('keyup', function() { | |
var SearchTermVariable = $('#search-input').val().toString().toLowerCase(); | |
if($.trim(SearchTermVariable) == '') { | |
$('ul#group-contact-list li').show(); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT e.date_subscribed, | |
countries.name | |
FROM countries | |
JOIN contacts c | |
LEFT OUTER JOIN contacts_economic_updates_countries e | |
ON e.country_name = countries.name | |
WHERE c.contact_id='80d0624061395e3d9f108165cd163e004a2ed12e37def2995f866d82dd40b3f2' | |
ORDER BY countries.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ExampleRestController extends Controller_Rest { | |
/** | |
* Make sure the router method has the same method signature as the parent::router declaration. | |
* @see fuel/core/classes/controller/rest.php | |
*/ | |
public function router($method, array $params) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<rss version="2.0"> | |
<channel> | |
<title>UKVetsOnline Content for Byre Veterinary Surgery</title> | |
<link>http://www.ukvetsonline.co.uk/node/313954?&m=&mp=313954</link> | |
<description>The latest in advice & care, promotions, and news from UKVetsOnline.</description> | |
<language>en-us</language> | |
<pubDate>Tue, 18 Jan 2011 02:13:01 +0000</pubDate> | |
<lastBuildDate>Tue, 07 Aug 2012 11:45:33 +0100</lastBuildDate> | |
<item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
KEY="$HOME/.ssh/id_dsa.pub" | |
if [ ! -f ~/.ssh/id_dsa.pub ];then | |
echo "private key not found at $KEY" | |
echo "* please create it with "ssh-keygen -t dsa" *" | |
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *" | |
exit | |
fi |
OlderNewer