Skip to content

Instantly share code, notes, and snippets.

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.
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
@chancancode
chancancode / 0_reuse_code.js
Created December 12, 2013 00:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
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
import Ember from 'ember';
export default Ember.Controller.extend({
fields: Ember.A(),
actions: {
addField() {
this.get('fields').insertAt(0, { label: '1' });
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
this.set('range', Array(5));
},
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
export default class ApplicationController extends Controller {
queryParams = ['myArray'];
// The default value being an array is important. Changing this
// to anything else fixes the problem.
@tracked myArray = [];
}
@chancancode
chancancode / lambda_function.py
Created December 31, 2021 20:33 — forked from matt2005/lambda_function.py
Alexa Smart Home Skill Adapter for Home Assistant
"""
Copyright 2019 Jason Hu <awaregit at gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software