Skip to content

Instantly share code, notes, and snippets.

Alex Coles myabc

Block or report user

Report or block myabc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9526121
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 ##
View benchmark_maps.rb
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
View gist:24e71a74ef08185eaf6b
arr = [:a, :b, :c]
def check_item(item)
item == :c
end
Object.class_eval do
alias ⅋ method
end
@myabc
myabc / gist:e855281c3a68bcb1f974
Created Dec 11, 2014
Inplace Editor directive
View gist:e855281c3a68bcb1f974
<!--
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>
View gist:7506ad8b27eb35a6a019
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) {
View gist:25652
<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
View gist:44351
[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
View gist:44505
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),
View gist:44713
[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
View gist:44716
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),
You can’t perform that action at this time.