Skip to content

Instantly share code, notes, and snippets.

View crittermike's full-sized avatar

Mike Crittenden crittermike

View GitHub Profile
aggregates:
Twitter:
url: "http://twitter.com/statuses/user_timeline/18167889.rss"
last_updated: 1250624528
feather: "link"
author: 1
data:
name: "Tweet!"
source: "link"
description: "description"
$("p:contains('search term')").each(function(){
$(this).html($(this).html().replace(/search term/, "replace term"));
});
<div id="wrapper">
<div id="floated-element">This is floated</div>
</div>
<p>If you gave #wrapper overflow: hidden, then I show up below
#floated-element instead of stacked all up on it.</p>
<h1>What Are Your Areas of Expertise?</h1>
<p>Receive industry news in real-time.</p>
name = FGP Custom
description = Miscellaneous custom stuff for FGP
core = 6.x
<div id="iphone-wrapper">
<div id="iphone-wrapper-inner">
<!-- put everything except the nav in here and give this a fixed height which is the
height of #iphone-wrapper minus the height of #nav. so this becomes our new scrolling
content area -->
</div>
<div id="nav">
<!-- keep this as position absolute because #iphone-wrapper won't scroll (we let
#iphone-inner-wrapper do that instead) so we don't have to worry about it moving up. -->
function isTime(time) {
return time.match(/(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)/);
}
$(document).ready(function(){
$('.view-news-frontpage .views-field-title').click(function(){
$(this).next().toggle();
$(this).next().next().toggle();
})
})
$(document).ready(function(){
$('input.whatever').timeConvert();
})
<?php
// Create a new tag.
function add($task_id, $text) {
$data = array(
'task_id' => $task_id,
'user_id' => $this->tank_auth->get_user_id(),
'content' => strip_tags(trim($text))
);
$this->db->insert('comments', $data);