This file contains hidden or 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
load('lib/auth.js'); | |
var start = new Date(2014,1,28); | |
var end = new Date(2014,2,1); | |
print('start:', start); | |
print('end:', end); | |
db.jsevents.aggregate([ | |
{ | |
$match: |
This file contains hidden or 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
require_dependency CbIntl::Engine.root.join('app','controllers','cb_intl','jobs_controller').to_s | |
module CbIntl | |
class JobsController < ApplicationController | |
include CBVisitorTracker::Tracker | |
append_after_filter :track_visitors, :only => [:detail, :jobresults] | |
def track_visitors | |
self.visitor_track[:job_results] = @jobdids.join(',') unless @jobdids.nil? | |
self.visitor_track[:site_property] = CbIntl.site_name |
This file contains hidden or 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
require_dependency CbIntl::Engine.root.join('app','controllers','cb_intl','jobs_controller').to_s | |
module CbIntl | |
class JobsController < ApplicationController | |
include CBVisitorTracker::Tracker | |
append_after_filter :track_visitors, :only => [:detail, :jobresults] | |
def track_visitors | |
self.visitor_track[:job_results] = @jobdids.join(',') unless @jobdids.nil? | |
self.visitor_track[:site_property] = 'WIR' |
This file contains hidden or 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
gem 'cb_visitor_tracker', :git => 'https://github.com/cbdr/cb-visitor-tracker.git', :branch => 'stable' | |
# |
This file contains hidden or 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
require_dependency CbIntl::Engine.root.join('app','controllers','cb_intl','jobs_controller').to_s | |
module CbIntl | |
class JobsController < ApplicationController | |
append_after_filter :track_visitors, :only => [:detail, :jobresults] | |
def track_visitors | |
self.visitor_track[:job_results] = @jobdids.join(',') unless @jobdids.nil? | |
self.visitor_track[:site_property] = 'WIR' | |
self.visitor_track[:ipath] = params[:ipath] unless params[:ipath].nil? |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install libfreetype6 libfreetype6-dev libfontconfig | |
# /etc/apt/sources.list should contain these: | |
# deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse | |
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse | |
sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections |
This file contains hidden or 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
" Appearance { | |
" Solarized { | |
syntax enable | |
let g:solarized_termcolors=256 | |
set background=dark | |
colorscheme solarized | |
"colorscheme github | |
" colorscheme distinguished | |
" colorscheme codeschool | |
let g:solarized_termtrans=1 |
This file contains hidden or 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
#we will abstract this out into the base class / a yaml file later | |
def add_additional_tracking_params | |
self.visitor_track[:BID] = cb_bid unless cb_bid.nil? | |
if @data.respond_to? :job_results | |
self.visitor_track[:job_results] = \ | |
@data.job_results.jobs.select { |j| !j.nil? }.map {|job| job.id }.join(',') | |
if @data.job_results.respond_to? :keywords | |
self.visitor_track[:keywords] = \ | |
@data.job_results.keywords unless \ | |
@data.job_results.keywords.nil? || @data.job_results.keywords.empty? |
This file contains hidden or 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
#!/bin/bash | |
play() { | |
playlist="http://www.bbc.co.uk/radio/listen/live/r"$1"_aaclca.pls" | |
echo $playlist | |
if mpc | |
then | |
mpc add $playlist | |
mpc play | |
else | |
mplayer -cache 5120 -cache-min 1 -playlist $playlist |
This file contains hidden or 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
> start = new Date(2014,0,30) | |
ISODate("2014-01-30T00:00:00Z") | |
> end = new Date(2014,0,31) | |
ISODate("2014-01-31T00:00:00Z") | |
> db.jsevents.aggregate({ $match: { 'model.CreatedDT' : {$gt: start, $lt: end} }}, {$group: {_id: "$model.params_job_did", 'params_job_did': {$sum: 1}}}, {$sort: {'params_job_did': -1}}, {$limit: 4}) | |
{ | |
"result" : [ | |
{ | |
"_id" : null, | |
"params_job_did" : 85940 |