Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Crittenden mikecrittenden

View GitHub Profile
View gist:515864
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"
View gist:515868
$("p:contains('search term')").each(function(){
$(this).html($(this).html().replace(/search term/, "replace term"));
});
View gist:527052
<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>
View new.html
<h1>What Are Your Areas of Expertise?</h1>
<p>Receive industry news in real-time.</p>
View fgp.info
name = FGP Custom
description = Miscellaneous custom stuff for FGP
core = 6.x
View gist:557911
<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. -->
View gist:605190
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])$)/);
}
View viewstoggler.js
$(document).ready(function(){
$('.view-news-frontpage .views-field-title').click(function(){
$(this).next().toggle();
$(this).next().next().toggle();
})
})
View timeconvertexample.js
$(document).ready(function(){
$('input.whatever').timeConvert();
})
View tag.php
<?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);