Skip to content

Instantly share code, notes, and snippets.

View ncammarata's full-sized avatar

Nick Cammarata ncammarata

View GitHub Profile
var gist = 'this is a gist dawg!';
<!DOCTYPE html>
<html>
<head>
<title>Dead Simple Twitter Search API jQuery Feed</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="jQuery.twitterFeed.js"></script>
<script src="jquery.twitter-usage-ex.js"></script>
<link href="jQuery.twitterFeed.css" media="screen" rel="stylesheet" type="text/css">
</head>
<body>
;(function ($) {
var mention = function(str) {
return str.replace(/[@]+[A-Za-z0-9-_]+/ig, function(username) {
return username.link('http://twitter.com/'+username.replace('@',''));
});
},
hashtags = function(str) {
return str.replace(/[#]+[A-Za-z0-9-_]+/ig, function(tag) {
tag = tag.replace('#','%23');
return tag.link('http://search.twitter.com/search?q='+tag);
/* Just some basic styling we've provided */
#twitter li {margin-bottom: 10px; font-size: 12px; clear: both}
#twitter li img {float:left; margin:0px 10px 10px 0px;border:1px solid #c2c2c2; -moz-box-shadow: 0px 0px 4px #c2c2c2; -webkit-box-shadow: 0px 0px 4px #c2c2c2; box-shadow: 0px 0px 4px #c2c2c2;}
We couldn’t find that file to show.
;(function ($) {
var mention = function(str) {
return str.replace(/[@]+[A-Za-z0-9-_]+/ig, function(username) {
return username.link('http://twitter.com/'+username.replace('@',''));
});
},
hashtags = function(str) {
return str.replace(/[#]+[A-Za-z0-9-_]+/ig, function(tag) {
tag = tag.replace('#','%23');
return tag.link('http://search.twitter.com/search?q='+tag);
/*
* Smart event highlighting
* Handles for when events span rows, or don't have a background color
*/
$(function() {
var highlight_color = "#2EAC6A",
event_id = event_class_name = event_color = null;
$(".ec-event-bg").each(function(ele) {
ele.mouseover(function(evt) {
event_id = ele.attr("data-event-id");
Meteor.route
'': 'home'
login:
template: 'login'
events: 'submit form': (e) -> e.preventDefault()
'/users/:user_id':
template: 'profile'
getData: (user_id) -> Meteor.users.findOne user_id
Template.beatles.created = function() {
this.i_say = 'Hello';
this.you_say = 'Good Bye'
this.who = 'i'
}
Template.beatles.events({
'change select': function() { this.who = $(e.target).val(); }
});
// want
var setPostTitle = function($id, title) {
$firebase(base + "/posts/" + $id).$set({ title: title });
}
// doing now
var setPostTitle = function($id, title) {
post = $firebase(base + "/posts/" + $id);
post.title = title;
post.$save();