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
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.1 or one of its dependencies could not be resolved: Specified destination directory cannot be created: /Users/winfrebs/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.4.1 | |
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1 | |
from the specified remote repositories: | |
central (http://repo1.maven.org/maven2, releases=true, snapshots=false) | |
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.resolvePluginArtifact(DefaultMavenPluginManager.java:173) | |
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:144) | |
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:280) | |
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:194) |
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
winfreb:~ winfrebs$ ab -n2000 -c5 http://localhost:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 200 requests | |
Completed 400 requests | |
Completed 600 requests | |
Completed 800 requests |
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/ruby | |
# First crack at the smith-waterman algorithm... | |
# Ugh... | |
return 0 if ARGV.size != 2 | |
seq1, seq2 = ARGV.first.strip.split(''),ARGV.last.strip.split('') | |
# scoring scheme |
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
<script type="text/javascript"> | |
var base_uri = '<%= ENV.has_key?('RAILS_RELATIVE_URL_ROOT') ? ENV['RAILS_RELATIVE_URL_ROOT'] + '/' : '/' %>'; | |
base_uri.freeze; | |
</script> |
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
# Author: Bradford Winfrey | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
DEBUG = true | |
require 'pp' if DEBUG | |
tables = {} | |
schema_url = ARGV.first | |
schema_url = 'http://uswest.ensembl.org/info/docs/api/compara/compara_schema.html' if DEBUG |
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
class EmployeesController < ApplicationController | |
before_filter :new_employee_from_params, :only => :create | |
before_filter :new_employee, :only => [:index, :new] | |
filter_access_to :all, :attribute_check => true | |
def create | |
@employee.save! | |
end | |
protected |
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
ActionController.add_renderer :json do |json, options| | |
json = ActiveSupport::JSON.encode(json) unless json.respond_to?(:to_str) | |
json = "#{options[:callback]}(#{json})" unless options[:callback].blank? | |
self.content_type ||= Mime::JQGRID | |
self.response_body = json | |
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
def change_column(table_name, column_name, type, options = {}) | |
raise NotImplementedError, "change_column is not implemented" | |
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
/* pb.c -- decode a protobuf into its field numbers and wire values. | |
* | |
* This decoder does not require a .proto file. It is equivalent to a | |
* generic XML parser, in that it can parse the file, but doesn't know | |
* semantically what any of it means. Also like XML, it doesn't know whether | |
* a 32-bit value is an integer or a float, signed or unsigned. Again, this | |
* is much like XML, where you are similarly in the dark if you see a fragment | |
* like <foo>332</foo>. | |
* | |
* Joshua Haberman <joshua@reverberate.org> |
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
$text = $tweet->title; | |
$text = preg_replace("#(^|[\n ])@([^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://www.twitter.com/\\2\" >@\\2</a>'", $text); | |
$text = preg_replace("#(^|[\n ])([a-z]+:\/\/\S+[^ \.{1,3}$])#ise", "'\\1<a href=\"\\2\" >\\2</a>'", $text); | |
$text = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://\\2\" >\\2</a>'", $text); |