Skip to content

Instantly share code, notes, and snippets.

Mark DiMarco markmarkoh

Block or report user

Report or block markmarkoh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:273153
1261089661:ImageDAO.php:function=getImagesByUUID;userID=761;accountType=11;
View gist:273170
{"time":1261089661,"file":"ImageDAO.php","function":"getImagesByUUID","userID":"761","accountType":"11"}
View gist:273676
function() {
emit(this.uploadType, {count : 1});
}
View gist:273680
function(key, values) {
var sum = 0;
values.forEach(function(f) {
sum += f.count;
});
return {count: sum};
};
View gist:273683
require 'rubygems'
require 'mongo'
def db
$db ||= Mongo::Connection.new("localhost", 27017).db("logs")
end
def logs
$logs ||= db.collection("flex")
end
View gist:273687
require 'model'
@s = Chart.upload_types
@s.find().to_a.each do |f|
puts "#{f['_id']} : #{f['value']['count']}"
end
View gist:273698
mark@stats:~/$ ruby test.rb
document : 300.0
image : 17910.0
video : 1000.0
View gist:273762
require 'rubygems'
require 'sinatra'
require 'haml'
require 'model'
set :port, 80
get '/' do
protected!
View gist:273767
def pie(data_array)
@labels = ""
@data_str = ""
@data = []
@sum = 0
data_array.find().to_a.each do |f|
@labels += "#{f['_id']}|"
@sum += f['value']['count'].to_i
@data.push(f['value']['count'].to_i)
end
View gist:273770
%h1
Stats
#upload
Uploaded File Breakdown
#pie= @upload_types
You can’t perform that action at this time.