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
module Topsy | |
.. | |
# Returns list of authors that talk about the query. The list is sorted by frequency of posts and the influence of authors. | |
# | |
# @param [String] q the search query string | |
# @param [Hash] options method options | |
# @option options [String] :window Time window for results. (default: 'a') Options: auto - automatically pick the most recent and relevant window. h last hour, d last day, w last week, m last month, a all time | |
# @option options [Integer] :page page number of the result set. (default: 1, max: 10) |
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
namespace :db do | |
desc "drops, creates, migrates and seeds the database" | |
task :reload do | |
Rake::Task["db:drop"].invoke | |
Rake::Task["db:create"].invoke | |
Rake::Task["db:migrate"].invoke | |
Rake::Task["db:seed"].invoke | |
end |
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
after :update_code do | |
# ... | |
if uses_whenever | |
if "cron_node".eql? current_node # is there a current_node variable in capistrano or something like that? | |
run "cd #{current_release} && whenever --update-crontab #{application}" | |
sudo "chmod 775 #{current_release}/script/runner" | |
end |
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
class Admin::PicturesController < ApplicationController | |
layout 'admin' | |
admin_assistant_for Picture do |admin| | |
admin.index do |index| | |
index.columns :image | |
index[:image].image_size = "75x75" | |
end | |
end | |
end |
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
/* | |
Correction for step #5 of http://pusherapp.com/docs/quickstart | |
Where it says: | |
*/ | |
server.bind('thing-create', function(thing) { | |
alert('A thing was created: '+ thing.name); | |
};) | |
/* It should say: */ |
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
*filter | |
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT | |
# Accepts all established inbound connections | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT |
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
window.onload = function () { | |
var raphael = Raphael("holder"); | |
raphael.g.txtattr.font = "12px 'Trebuchet MS','Trebuchet','Verdana','sans-serif'"; | |
raphael.g.text(210, 20, "User Activity").attr({"font-size": 16}); | |
var pie = raphael.g.piechart(260, 180, 90, [55, 20, 13], {legend: ["Active", "Inactive", "Recently Inactive"], legendpos: "west", href: ["http://google.com", "http://etagwerker.com", "http://github.com"]}); | |
pie.hover(function () { | |
this.sector.stop(); | |
this.sector.scale(1.1, 1.1, this.cx, this.cy); |
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
var bars_data = new google.visualization.DataTable(); | |
bars_data.addColumn('string', 'Month'); | |
bars_data.addColumn('number', 'Average response %'); | |
bars_data.addRows(6); | |
bars_data.setValue(0, 0, 'March'); | |
bars_data.setValue(0, 1, 0); | |
bars_data.setValue(1, 0, 'April'); | |
bars_data.setValue(1, 1, 3); | |
bars_data.setValue(2, 0, 'May'); |
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
[etagwerker@gesell topsy]$ cat topsy.gemspec | |
require File.expand_path("../lib/topsy/version", __FILE__) | |
Gem::Specification.new do |s| | |
s.name = %q{topsy} | |
s.version = Topsy::VERSION | |
s.platform = Gem::Platform::RUBY | |
s.required_rubygems_version = ">= 1.3.6" | |
s.authors = ["Wynn Netherland", "Ernesto Tagwerker"] | |
s.date = %q{2010-09-28} |
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
[etagwerker@gesell topsy]$ cat topsy.gemspec | |
require File.expand_path("../lib/topsy/version", __FILE__) | |
Gem::Specification.new do |s| | |
s.name = %q{topsy} | |
s.version = Topsy::VERSION | |
s.platform = Gem::Platform::RUBY | |
s.required_rubygems_version = ">= 1.3.6" | |
s.authors = ["Wynn Netherland", "Ernesto Tagwerker"] | |
s.date = %q{2010-09-28} |
OlderNewer