Rich Hickey: "you are able to write only code that matters."
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
(import '(org.apache.log4j Level)) | |
(logging/init :file "/var/log/riemann/riemann.log") | |
(logging/set-level "riemann.streams" Level/DEBUG) | |
; Listen on the local interface over TCP (5555), UDP (5555), and websockets | |
; (5556) | |
(let [host "127.0.0.1"] | |
(tcp-server :host host) | |
(udp-server :host host) | |
(ws-server :host host)) |
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
;; 158. decurry [medium] | |
;; http://www.4clojure.com/problem/158 | |
(fn decurry [f] | |
(fn [& args] | |
(reduce #(%1 %2) | |
f | |
args))) | |
;; 43. reverse interleave [medium] |
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
cd /home/naturejobs/apps/naturejobs/current | |
rvm use ree | |
nohup bundle exec rake sunspot:solr:reindex_jobs_in_place[b.miles@nature.com] RAILS_ENV=production & |
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
Job.active.find_in_batches(:include => [:packages, :sites, :addresses, :upgrades], :batch_size => 1000) do |batch| | |
Sunspot.index!(*batch) | |
end | |
Job.find_in_batches(:conditions => {:active => false}, :include => [:packages, :sites, :addresses, :upgrades], :batch_size => 1000) do |batch| | |
Sunspot.index!(*batch) | |
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
[9] pry(main)> "10.1038/nj.hafalla.2007.json"[%r{10\.1038/.+(?=\.json)}] | |
=> "10.1038/nj.hafalla.2007" |
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
%nav | |
.nav | |
%ul | |
%li.first | |
%a{:href => "http://www.nature.com/nams/svc/myaccount"} Profile | |
%li | |
%a{:href => "http://www.nature.com/nams/svc/myaccount/show/ealerts"} Alerts | |
%li | |
%a{:href => "http://www.nature.com/nams/svc/myaccount/show/subs"} Subscriptions | |
%li |
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
@wip | |
Feature: Consolidated 'My Profile' page | |
In order to make my profile information more accessible and usable | |
As a user | |
I want to be able to view all of my profile related info from a single page | |
Scenario: My profile page contains navigation tabs | |
Given I am logged in | |
When I go to my profile page | |
Then I should see the following tabs: "Profile | Alerts | Subscriptions | Saved Searches | NatureJobs" |
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
!!! 5 | |
%html | |
=render :partial => 'layouts/redesign/head' | |
%body | |
.container | |
.header | |
.nav nav | |
.ad banner ad | |
%h1 Naturejobs | |
.main |
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
@mock-article | |
@wip | |
Feature: Jobs box on article pages [JOBS-3540] | |
In order to see recently posted jobs | |
As a user | |
I want to see a standard jobs box in the right hand column of article pages | |
Scenario: Viewing jobs box | |
Given a viewable article has been syndicated | |
And more than one page of active jobs exists |
NewerOlder