Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Ames-Messinger scottmessinger

View GitHub Profile
View components.expensive-outline-item.js
import Ember from 'ember';
export default Ember.Component.extend({
didRender(){
console.log('didRender expensive-outline-item.hbs')
}
});
View Demo Flash Output.js
(function (lib, img, cjs, ss) {
var p; // shortcut to reference prototypes
// library properties:
lib.properties = {
width: 1000,
height: 1000,
fps: 24,
color: "#FFFFFF",
View bower.json
{
"dependencies": {
"ember": "https://github.com/components/ember.git#4cc46c9c635669f8cadcb40031d8a382536d8a58",
"ember-cli-shims": "https://github.com/thorsteinsson/ember-cli-shims.git#0ebaef04357f08172d872fbd59e9534426a40df9",
"ember-cli-test-loader": "ember-cli-test-loader#0.2.0",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6",
"ember-qunit": "0.4.9",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.19",
"ic-ajax": "~2.0.2",
@scottmessinger
scottmessinger / 00_usage.rb
Last active Aug 29, 2015
Transproc thoughts
View 00_usage.rb
# Usage: Setup
module A
extend Transproc::Registry
def self.hi(message)
h[:a_message] = message
end
end
module B
extend Transproc::Registry
@scottmessinger
scottmessinger / 00_plan.md
Last active Aug 29, 2015
Payload Builder
View 00_plan.md

Suggested Plan to migrate from AR to ES in our Rails app

Clean up Queries

  • Change the specs and the queries to move filters from filter to query.filtered.filter
  • Move {term: {budget_lea_id: budget_lea_id} from query to query.filtered.filter

Remove JBuilder

  • Create PayloadBuilder library to build payloads
  • Convert JBuilder code to PayloadBuilder library
@scottmessinger
scottmessinger / process.rb
Created Jul 15, 2015
Importer with Transproc
View process.rb
preprocessor = Preprocessor.build
processor = Processor.build
evaluator = InputFunctions[:eval_values, [{ 'jd' => 'jd001' }]]
create_authors_with_books = rom.command([
:authors, [:create, [:books, [:create]]]
])
@scottmessinger
scottmessinger / component.js
Last active Aug 29, 2015
Data down observers
View component.js
// SearchController
export default Ember.Controller.extend({
queryParams: ['query']
})
// SearchController template
{{x-search query=query}}
// X-Search component
export default Ember.Component.extend({
View NVD3--scatter-bubble.js
/**
* [SCATTER](http://nvd3.org/examples/scatter.html)
*/
[
{
"key": "Group 0",
"values": [
{
"x": 0.6396293678966859,
@scottmessinger
scottmessinger / old_node.rb
Last active Aug 29, 2015
How I imagine the migration stuff happening
View old_node.rb
class OldNode
def lesson
@lesson ||= Lesson.find(id)
end
def verify_migration
self.verify_field_names
self.verify_sections
end
View gist:11200608
App.PlanbookDate = Ember.Model.extend({
/**
* Computed Property
* This property returns a routine. If the routine is pristine,
* it creates a routine then adds parts from the routine template to it.
*
* If the routine is not pristine, it just returns the routine.
*
*/
You can’t perform that action at this time.