Skip to content

Instantly share code, notes, and snippets.

Godfrey Chan chancancode

Block or report user

Report or block chancancode

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 controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
this.set('range', Array(5));
},
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
fields: Ember.A(),
actions: {
addField() {
this.get('fields').insertAt(0, { label: '1' });
View method_defined_within.rb
def method_defined_within?(name, klass, superklass = klass.superclass) # :nodoc:
if klass.method_defined?(name) || klass.private_method_defined?(name)
if superklass.method_defined?(name) || superklass.private_method_defined?(name)
klass.instance_method(name).owner != superklass.instance_method(name).owner
else
true
end
else
false
end
@chancancode
chancancode / 0_reuse_code.js
Created Dec 12, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View ar_sample2.rb
require 'active_record'
require 'minitest/autorun'
ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: 'foobar.db'
class Record < ActiveRecord::Base
connection.create_table table_name, force: true do |t|
t.string :name
end
end
View gist:67752
On Feb 20, 2009, at 4:24 PM, "Olusegun A.A" <xxxxxx@gmail.com> wrote:
** CRAIGSLIST ADVISORY --- AVOID SCAMS BY DEALING LOCALLY
** Avoid: wiring money, cross-border deals, work-at-home
** Beware: cashier checks, money orders, escrow, shipping
** More Info: http://www.craigslist.org/about/scams.html
Hello,
Do you still have this item available for sale at the moment? Get back asap.
You can’t perform that action at this time.