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
require "colorize" | |
name = "Linus Oleander" | |
to = "Slug" | |
puts "To '#{to}' folder, match on '#{name}'?".yellow | |
abort("Bye!") unless $stdin.gets =~ /y/ | |
`ls`.split(/\s+/).each do |media| | |
next if not File.directory?(media) or media == to | |
gitish = `cd '#{media}' && du | grep '.git$'`.split(" ").map do |git| |
- Projektnamn, är Water ett bra namn?
- Vart ska projektet hostas?
- Finansiellt stöd för servrar och kodhosting
- Tidigare brainstorming - bilder
- Material att kolla på under lovet
- Projektnamn, är Water ett bra namn?
- Vart ska projektet hostas?
- Finansiellt stöd för servrar och kodhosting
- Tidigare brainstorming - bilder
- Material att kolla på under lovet
- Projektnamn, är Water ett bra namn?
- Vart ska projektet hostas?
- Finansiellt stöd för servrar och kodhosting
- Tidigare brainstorming - bilder
- Material att kolla på under lovet
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
/* Both fails */ | |
$(function() { | |
Beacon.listen(function(payload) { | |
console.debug("payload=", payload); | |
}); | |
Beacon.connect('key', ['incoming'], { | |
log: true | |
}); | |
}); |
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
<fieldType name="text" class="solr.TextField" omitNorms="false"> | |
<analyzer type="index"> | |
<tokenizer class="solr.NGramTokenizerFactory" minGramSize="2" maxGramSize="15" /> | |
<filter class="solr.LowerCaseFilterFactory"/> | |
</analyzer> | |
<analyzer type="query"> | |
<tokenizer class="solr.StandardTokenizerFactory"/> | |
<filter class="solr.StandardFilterFactory"/> | |
<filter class="solr.LowerCaseFilterFactory"/> | |
<filter class="solr.PorterStemFilterFactory"/> |
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
/* | |
URL: http://localhost:9002/solr/select?fl=*+score&start=0&q=Bruce%20Willis&qf=title_text+torrent_names_text+actor_names_text+subtitle_names_text&wt=ruby&fq=type:Movie&defType=dismax&rows=30&debugQuery=on | |
*/ | |
{ | |
'responseHeader'=>{ | |
'status'=>0, | |
'QTime'=>47, | |
'params'=>{ | |
'fl'=>'*score', | |
'debugQuery'=>'on', |
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
SELECT `users`.* FROM `users` | |
LEFT JOIN `searches` ON `searches`.`user_id` = `users`.`id` | |
WHERE (searches.id IS NULL OR searches.updated_at < DATE_SUB(NOW(), INTERVAL 1 MONTH)) | |
ORDER BY users.created_at DESC LIMIT 2 |
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
require "rest-client" | |
begin | |
exists = RestClient.head("http://google.com").code == 200 | |
rescue RestClient::Exception => error | |
exists = (error.http_code != 404) | |
end | |
puts "exists=#{exists}" |