This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
| ;by doppelganger (doppelheathen@gmail.com) | |
| ;This file is provided for your own use as-is. It will require the character rom data | |
| ;and an iNES file header to get it to work. | |
| ;There are so many people I have to thank for this, that taking all the credit for | |
| ;myself would be an unforgivable act of arrogance. Without their help this would | |
| ;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
| ;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias gitclean="git branch | grep -v master | xargs git branch -d" | |
| alias dockerclean="docker rm $(docker ps -a -q) && docker rmi $(docker images -q)" | |
| alias gca="git commit --amend --no-edit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Service from 'path/to/service'; | |
| import 'jasmine-ajax' | |
| describe('Service', () => { | |
| let request, promise; | |
| let instance = Service; | |
| let payload = {foo:'bar'}; | |
| let path = '/path'; | |
| let callback = jasmine.createSpy('callback'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { isLoggedIn } from '../../common/utils'; | |
| class App extends React.Component { | |
| componentWillMount() { | |
| isLoggedIn(); // is undefined | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // (c) copyright unscriptable.com / John Hann | |
| // License MIT | |
| // For more robust promises, see https://github.com/briancavalier/when.js. | |
| function Promise () { | |
| this._thens = []; | |
| } | |
| Promise.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| main.ts | |
| import {provide} from 'angular2/core'; | |
| import {bootstrap} from 'angular2/platform/browser'; | |
| import {ROUTER_PROVIDERS, LocationStrategy, PathLocationStrategy, APP_BASE_HREF } from 'angular2/router'; | |
| import {HTTP_PROVIDERS} from 'angular2/http'; | |
| import {Notification} from './scripts/services/notifications'; | |
| import {SessionService} from './scripts/services/session.service'; | |
| import {UUHttp} from './scripts/services/uuHttp'; | |
| import {AppCmp} from './scripts/views/app'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.ts | |
| @RouteConfig([ | |
| { path: '/login', name: 'Login', component: LoginFormCmp, useAsDefault: true }, | |
| { path: '/home', name: 'Home', component: HomeCmp}, | |
| { path: '/system/health', name: 'SystemHealth', component: SystemHealthCmp } | |
| ]) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From: /../gems/activerecord-4.1.11/lib/active_record/attribute_methods.rb @ line 129 ActiveRecord::AttributeMethods::ClassMethods#method_defined_within?: | |
| 128: def method_defined_within?(name, klass, superklass = klass.superclass) # :nodoc: | |
| => 129: if klass.method_defined?(name) || klass.private_method_defined?(name) | |
| 130: if superklass.method_defined?(name) || superklass.private_method_defined?(name) | |
| 131: klass.instance_method(name).owner != superklass.instance_method(name).owner | |
| 132: else | |
| 133: true | |
| 134: end | |
| 135: else |