Skip to content

Instantly share code, notes, and snippets.

View myabc's full-sized avatar

Alexander Brandon Coles myabc

View GitHub Profile
Files sprockets-2.2.2.backport1/LICENSE and sprockets-2.2.2.backport2/LICENSE are identical
diff -rcsr sprockets-2.2.2.backport1/README.md sprockets-2.2.2.backport2/README.md
*** sprockets-2.2.2.backport1/README.md 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/README.md 2014-03-13 11:27:11.000000000 +0100
***************
*** 361,366 ****
--- 361,383 ----
## Version History ##
require 'benchmark'
hash = { a: 'a', b: 'b', c: 'c', d: 'd' }.freeze
keys = [:a, :b].freeze
n = 500_000
Benchmark.bm do |x|
x.report do
n.times do
arr = [:a, :b, :c]
def check_item(item)
item == :c
end
Object.class_eval do
alias ⅋ method
end
@myabc
myabc / gist:e855281c3a68bcb1f974
Created December 11, 2014 11:07
Inplace Editor directive
<!--
PROBLEM: Inplace Editor directive has too many responsibilities.
-->
<inplace-editor
ined-type="select2"
ined-entity="workPackage"
ined-attribute="assignee"
ined-attribute-embedded="false">
</inplace-editor>
diff --git a/frontend/app/ui_components/has-preview-directive.js b/frontend/app/ui_components/has-preview-directive.js
index e6ac2ee..e304e62 100644
--- a/frontend/app/ui_components/has-preview-directive.js
+++ b/frontend/app/ui_components/has-preview-directive.js
@@ -26,7 +26,15 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
-module.exports = function() {
+module.exports = function($http, $location, $anchorScroll) {
<0.9.7-incubating nonfatal general error> org.apache.openjpa.persistence.PersistenceException: There were errors initializing your configuration: org.apache.openjpa.lib.util.ParseException: Instantiation of plugin "QueryCompilationCache" with value "true" caused an error "java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap". The alias or class name may have been misspelled (as it closely matches the valid plugin alias "true"), or the class may not be available in the class path. Valid aliases for this plugin are: [all, false, true]
at org.apache.openjpa.lib.conf.Configurations.getCreateException(Configurations.java:341)
at org.apache.openjpa.lib.conf.Configurations.newInstance(Configurations.java:198)
at org.apache.openjpa.lib.conf.ObjectValue.newInstance(ObjectValue.java:103)
at org.apache.openjpa.conf.QueryCompilationCacheValue.newInstance(QueryCompilationCacheValue.java:57)
at org.apache.openjpa.lib.conf.Plugin
[alexbcoles@mondiale do_postgres (jdbc)]$ rake compile
(in /Users/alexbcoles/git-repos/do/do_postgres)
/Library/Ruby/Gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
mkdir -p tmp/universal-darwin9.0/do_postgres_ext
cd tmp/universal-darwin9.0/do_postgres_ext
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:8: command not found: pg_config --includedir-server
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:21: command not found: pg_config --libdir
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:21: command not found: pg_config --includedir
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:21: command not found: pg_config --libdir
checking for main() in -lpq... no
@myabc
myabc / gist:44505
Created January 7, 2009 23:37 — forked from pietia/gist:44478
diff --git a/do_jdbc/src/java/data_objects/Command.java b/do_jdbc/src/java/data_objects/Command.java
index f0ccc00..922db88 100644
--- a/do_jdbc/src/java/data_objects/Command.java
+++ b/do_jdbc/src/java/data_objects/Command.java
@@ -89,6 +89,9 @@ public class Command extends RubyObject {
RubyClass resultClass = Result.createResultClass(runtime, moduleName, errorName, driver);
java.sql.Connection conn = (java.sql.Connection) wrapped_jdbc_connection.dataGetStruct();
+ // affectedCount = 1 means 1 updated row
+ // or 1 row in result set that represents returned key (insert...returning),
[alexbcoles@mondiale do_mysql (jdbc)]$ jruby -S rake spec
(in /Users/alexbcoles/git-repos/do/do_mysql)
/usr/local/jruby-1.1.5/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
mkdir -p pkg/classes
DataObjects::Mysql
- should expose the proper DataObjects classes
- should connect successfully via TCP
- should be able to send queries asynchronously in parallel
- should return the current character set
@myabc
myabc / gist:44716
Created January 8, 2009 12:47 — forked from pietia/gist:44478
diff --git a/do_jdbc/src/java/data_objects/Command.java b/do_jdbc/src/java/data_objects/Command.java
index f0ccc00..922db88 100644
--- a/do_jdbc/src/java/data_objects/Command.java
+++ b/do_jdbc/src/java/data_objects/Command.java
@@ -89,6 +89,9 @@ public class Command extends RubyObject {
RubyClass resultClass = Result.createResultClass(runtime, moduleName, errorName, driver);
java.sql.Connection conn = (java.sql.Connection) wrapped_jdbc_connection.dataGetStruct();
+ // affectedCount = 1 means 1 updated row
+ // or 1 row in result set that represents returned key (insert...returning),