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
hi there |
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
def search(*args) | |
params = {:id => content_ids} | |
if Hash === args.last | |
if args.last[:conditions] | |
args.last[:conditions].merge!(params) | |
else | |
args.last[:conditions] = params | |
end | |
else | |
args << {:conditions => params} |
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
def hello | |
puts "this is a test" | |
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
#!/usr/bin/env ruby | |
# Kata #4: Football Data | |
def smallest_spread(file) | |
weather_data = File.open(file).readlines | |
temp_spread = weather_data.map {|line| | |
next unless line.match(/\s([A-Za-z_]+).*?(\d+)\s\s-\s\s(\d+)/) | |
day, max, min = $1, $2.to_i, $3.to_i |
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
== Bridge Features == | |
System | |
* shutdown() - shutdown limewire | |
-- org.limewire.core.api.Application::stopCore() | |
* restart() - restart limewire | |
-- org.limewire.core.api.Application::startCore() ? | |
* setOption() - change a configuration option | |
-- #TODO | |
* getOption() - retrieve a configuration option |
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
== Bridge API == | |
=== Requests === | |
A bridge command is written in YAML, in the following format: | |
Request: | |
--- | |
handler: library | |
action: show |
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
diff --git a/apps/tracker/modules/torrent/actions/actions.class.php b/apps/tracker/modules/torrent/actions/actions.class.php | |
index 2997f23..fbd83ae 100644 | |
--- a/apps/tracker/modules/torrent/actions/actions.class.php | |
+++ b/apps/tracker/modules/torrent/actions/actions.class.php | |
@@ -48,8 +48,6 @@ class torrentActions extends sfActions | |
if(function_exists("apache_setenv")) // could be running under fastcgi or in non-apache env | |
apache_setenv('no-gzip', 1); | |
ini_set('zlib.output_compression', 0); | |
- ini_set('implicit_flush', 1); | |
- header('Content-type: multipart/x-mixed-replace;boundary="rn9012"'); |
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
# .git/hooks/pre-commit: | |
#!/usr/bin/env sh | |
rake static:generate | |
git add static | |
# Rake task: | |
require 'rake' | |
ROOT = File.join(File.dirname(__FILE__)) |
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
#!/usr/bin/env ruby | |
port_list = `port installed` | |
port_list.each_line do |port_line| | |
port_line =~ / ([^\s]+) @([^\+\s]+)(\+?[^\s]*)/ | |
name, version, variants = $1, $2, $3 | |
next if name.nil? | |
variants = variants.split('+') rescue [] | |
puts "sudo port install #{name} #{variants.map{|v| " +"+v unless v == '' }.join}" | |
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
$.fn.updateList = function(playlist) { | |
var items = itemsFromPlaylist(playlist); | |
var headers = commonHeaders(items); | |
for(var i in playlist.files) { | |
var innerHtml = ""; | |
for(var j in headers) { | |
innerHtml += "<td class='"+headers[j]+"'>" + (state.library[playlist.files[i]][headers[j]] || '') + "</td>"; | |
} | |
var newRow = $('<tr id="'+playlist.name+'_'+playlist.files[i]+'"><td><input type="checkbox" value="' + playlist.files[i] + '" /></td>' + innerHtml + " </tr>").data('idx', playlist.files[i]); |
OlderNewer