Skip to content

Instantly share code, notes, and snippets.

View jhirn's full-sized avatar

Joseph Hirn jhirn

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jhirn on github.
  • I am jhirn (https://keybase.io/jhirn) on keybase.
  • I have a public key whose fingerprint is 141E 3B24 B783 7421 49AD BCEA DC2A 943F 2EC0 8989

To claim this, I am signing this object:

function NumberDescriber(props) {
let description;
if (props.number % 2 == 0) {
description = <strong>even</strong>;
} else {
description = <h2>odd</h2>;
}
return <div>{props.number} is an {description} number</div>;
}
#Pom without clj-http explicitly
jh@jhdmba:~/src/devmynd/opinionlab/dev/dev2/projects/alestorm (master) $ mvn dependency:tree -Dverbose=true | grep http
[INFO] | +- clj-http:clj-http:jar:0.7.7:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.3:compile
[INFO] | | +- (org.apache.httpcomponents:httpclient:jar:4.3:compile - omitted for conflict with 4.1.1)
[INFO] | | +- org.apache.httpcomponents:httpmime:jar:4.3:compile
[INFO] | | | \- (org.apache.httpcomponents:httpclient:jar:4.3:compile - omitted for conflict with 4.1.1)
[INFO] | | \- (org.apache.httpcomponents:httpclient:jar:4.0.1:test - omitted for conflict with 4.1.1)
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.1.1:test
jh@jhdmba:~/src/devmynd/opinionlab/dev/dev2/projects/alestorm (master) $ mvn dependency:tree -Dverbose=true | grep http
[INFO] | +- clj-http:clj-http:jar:0.7.7:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.3:compile
[INFO] | | +- (org.apache.httpcomponents:httpclient:jar:4.3:compile - omitted for conflict with 4.1.1)
[INFO] | | +- org.apache.httpcomponents:httpmime:jar:4.3:compile
[INFO] | | | \- (org.apache.httpcomponents:httpclient:jar:4.3:compile - omitted for conflict with 4.1.1)
[INFO] | | \- (org.apache.httpcomponents:httpclient:jar:4.0.1:test - omitted for conflict with 4.1.1)
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.1.1:test
[INFO] | | +- (org.apache.httpcomponents:httpcore:jar:4.1:test - omitted for conflict with 4.3)
App.Views.List = Backbone.View.extend({
initialize: function() {
_.bindAll(this);
this.render();
},
render: function() {
var t = this;
this.$el.empty();
this.collection.each(function(item){
; nREPL 20130829.156
user>
#<Namespace opinionlab.lib.generate-test-edn>
opinionlab.lib.generate-test-edn> (init-geoip)
true
opinionlab.lib.generate-test-edn> (clojure.pprint/pp(take 1 (apply (partial data-set-stream "resources/comments.xml") generators)))
ArityException Wrong number of args (1) passed to: pprint$pp clojure.lang.Compiler.macroexpand1 (Compiler.java:6473)
opinionlab.lib.generate-test-edn> (clojure.pprint/pp (take 1 (apply (partial data-set-stream "resources/comments.xml") generators)))
ArityException Wrong number of args (1) passed to: pprint$pp clojure.lang.Compiler.macroexpand1 (Compiler.java:6473)
opinionlab.lib.generate-test-edn> (clojure.pprint/pp (first (take 1 (apply (partial data-set-stream "resources/comments.xml") generators))))
def raise_error
raise RuntimeError
end
class Foo
def method_missing(name, *args)
raise_error
end
end
@jhirn
jhirn / MyView.js
Last active December 19, 2015 19:19
App.Views.MyView = Backbone.View.extend({
initialize: function() {
_.bindAll(this); //Ignore this for now =)
this.template = JST['path/to/template'];
this.render();
},
render: function() {
this.$el.html(this.template({
collection: this.collection
App.Models.BaseModel = Backbone.Model.extend({
preParse: function(data){},
constructor: function(attributes, options){
options = options || {};
options.parse = true;
Backbone.Model.call(this, attributes, options);
},
(function() {
// Underscore methods that we want to implement on Array.
var methods = [
'all',
'any',
'compact',
'contains',
'countBy',
'detect',
'difference',