Skip to content

Commit

Permalink
removed carriage returns
Browse files Browse the repository at this point in the history
grep -rl $'\r' | xargs dos2unix
  • Loading branch information
majuscule committed Feb 7, 2013
1 parent 99df928 commit 7c65de2
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 264 deletions.
46 changes: 23 additions & 23 deletions lib/DDG/Spice/HackerNews.pm
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
package DDG::Spice::HackerNews;

use DDG::Spice;

triggers startend => "hn", "hackernews", "hacker news", "news.yc", "news.ycombinator.com", "hn search", "hnsearch", "hacker news search", "hackernews search";

spice to => 'http://api.thriftdb.com/api.hnsearch.com/items/_search?q=$1&limit=50&weights[title]=1.1&weights[text]=0.7&weights[domain]=2.0&weights[username]=0.1&weights[type]=0.0&weights[points]=1.25&boosts[fields][points]=0.15&boosts[fields][num_comments]=0.15&boosts[functions][pow%282,div%28div%28ms%28create_ts,NOW%29,3600000%29,72%29%29]=200.0&callback={{callback}}';

primary_example_queries "hn postgresql";
description "Search the Hacker News database for related stories/comments";
name "HackerNews";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/HackerNews.pm";
icon_url "/i/www.hnsearch.com.ico";
topics "programming", "social";
category "forums";
attribution github => ['https://github.com/adman','Adman'],
twitter => ['http://twitter.com/adman_X','adman_X'];
status "enabled";

handle remainder => sub {
return $_ if defined $_;
};

package DDG::Spice::HackerNews;

use DDG::Spice;

triggers startend => "hn", "hackernews", "hacker news", "news.yc", "news.ycombinator.com", "hn search", "hnsearch", "hacker news search", "hackernews search";

spice to => 'http://api.thriftdb.com/api.hnsearch.com/items/_search?q=$1&limit=50&weights[title]=1.1&weights[text]=0.7&weights[domain]=2.0&weights[username]=0.1&weights[type]=0.0&weights[points]=1.25&boosts[fields][points]=0.15&boosts[fields][num_comments]=0.15&boosts[functions][pow%282,div%28div%28ms%28create_ts,NOW%29,3600000%29,72%29%29]=200.0&callback={{callback}}';

primary_example_queries "hn postgresql";
description "Search the Hacker News database for related stories/comments";
name "HackerNews";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/HackerNews.pm";
icon_url "/i/www.hnsearch.com.ico";
topics "programming", "social";
category "forums";
attribution github => ['https://github.com/adman','Adman'],
twitter => ['http://twitter.com/adman_X','adman_X'];
status "enabled";

handle remainder => sub {
return $_ if defined $_;
};

1;
12 changes: 6 additions & 6 deletions lib/DDG/SpiceBundle/OpenSourceDuckDuckGo.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package DDG::SpiceBundle::OpenSourceDuckDuckGo;
# ABSTRACT: The open source Spice Bundle of DuckDuckGo

# This package is only a namespace/version holder

1;
package DDG::SpiceBundle::OpenSourceDuckDuckGo;
# ABSTRACT: The open source Spice Bundle of DuckDuckGo

# This package is only a namespace/version holder

1;
48 changes: 24 additions & 24 deletions share/spice/github_jobs/spice.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
function ddg_spice_github_jobs(github) {
if(github.length > 0) {
var query = DDG.get_query();
var re = /(?:\s*(?:i\s+|we\s+)?(?:need|want|deserve|seek|get)\s+(?:an?\s+)?)?(?:(.+)\s+)(?:jobs?|work|employment)(?:\s+(?:in\s+)?(.+))?/;
var description = query.replace(re, "$1");
var location = query.replace(re, "$2");
var moreat = "https://jobs.github.com/positions?description=" + encodeURIComponent(description) + "&location=" + encodeURIComponent(location);
var out = ''
out += '<div style="jobs"><ul>';
for(var i = 0;i < github.length;i++) {
out += '<li><a href="' + github[i].url + '">' + github[i].title
+ '</a> in ' + github[i].location + ' (' + github[i].company + ')</li>';
}
out += '</ul>';
var items = [[]];
items[0]['a'] = out;
items[0]['h'] = query + ' (GitHub Jobs)';
items[0]['s'] = 'GitHub';
items[0]['u'] = moreat;
items[0]['force_big_header'] = true;

nra(items);
}
}
function ddg_spice_github_jobs(github) {
if(github.length > 0) {
var query = DDG.get_query();
var re = /(?:\s*(?:i\s+|we\s+)?(?:need|want|deserve|seek|get)\s+(?:an?\s+)?)?(?:(.+)\s+)(?:jobs?|work|employment)(?:\s+(?:in\s+)?(.+))?/;
var description = query.replace(re, "$1");
var location = query.replace(re, "$2");
var moreat = "https://jobs.github.com/positions?description=" + encodeURIComponent(description) + "&location=" + encodeURIComponent(location);
var out = ''
out += '<div style="jobs"><ul>';
for(var i = 0;i < github.length;i++) {
out += '<li><a href="' + github[i].url + '">' + github[i].title
+ '</a> in ' + github[i].location + ' (' + github[i].company + ')</li>';
}
out += '</ul>';
var items = [[]];
items[0]['a'] = out;
items[0]['h'] = query + ' (GitHub Jobs)';
items[0]['s'] = 'GitHub';
items[0]['u'] = moreat;
items[0]['force_big_header'] = true;

nra(items);
}
}
Loading

0 comments on commit 7c65de2

Please sign in to comment.