Skip to content

Instantly share code, notes, and snippets.

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)
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
#!/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
<script type="text/javascript">
var base_uri = '<%= ENV.has_key?('RAILS_RELATIVE_URL_ROOT') ? ENV['RAILS_RELATIVE_URL_ROOT'] + '/' : '/' %>';
base_uri.freeze;
</script>
@bradfordw
bradfordw / gist:433675
Created June 10, 2010 21:38
Need the ensembl schema? Upset they give you html instead of the table defs? Run this!
# 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
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
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
def change_column(table_name, column_name, type, options = {})
raise NotImplementedError, "change_column is not implemented"
end
/* 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>
@bradfordw
bradfordw / gist:599482
Created September 27, 2010 17:52 — forked from jbynum/gist:599440
$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);