Skip to content

Instantly share code, notes, and snippets.

Avatar
🙈
🙉🙊

Marco Otte-Witte marcoow

🙈
🙉🙊
View GitHub Profile
View setup.js
Ember.Application.initializer({
name: 'authentication',
initialize: function(container, application) {
Ember.SimpleAuth.setup(container, application, {
authorizerFactory: 'authorizer:oauth2-bearer'
});
}
});
View keybase.md

Keybase proof

I hereby claim:

  • I am marcoow on github.
  • I am marcoow (https://keybase.io/marcoow) on keybase.
  • I have a public key whose fingerprint is 0EC5 B0E0 3A33 1DA0 6B2F 23F8 48F6 64E9 7230 3B2D

To claim this, I am signing this object:

View gist:150206
[request setRelationshipKeyPathsForPrefetching:[NSArray arrayWithObjects:@"articles", @"articles.features", nil]];
View gist:150207
Basket.all(:include => { :articles => :features})
View gist:150211
sudo gem install do_mysql -- --with-mysql-dir=/usr/local/mysql
View gist:150205
// application library 1
namespace App\Lib1;
const MYCONST = 'App\Lib1\MYCONST';
function MyFunction() {
return __FUNCTION__;
}
class MyClass {
View gist:202339
$ excellent shopping_basket.rb
Excellent result:
test.rb
* Line 1: ShoppingBasket does not validate any attributes.
* Line 1: ShoppingBasket defines initialize method.
* Line 1: ShoppingBasket does not specify attr_accessible.
Found 3 warnings.
View gist:202333
class ShoppingBasket < ActiveRecord::Base
def initialize(items = [])
self.items = items
end
end
View gist:210760
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 74 | 57 | 4 | 6 | 1 | 7 |
| Helpers | 32 | 23 | 0 | 2 | 0 | 9 |
| Models | 497 | 319 | 13 | 22 | 1 | 12 |
| Libraries | 499 | 282 | 5 | 35 | 7 | 6 |
| Model specs | 942 | 658 | 0 | 5 | 0 | 129 |
| View specs | 0 | 0 | 0 | 0 | 0 | 0 |
| Controller specs | 471 | 315 | 0 | 6 | 0 | 50 |