Skip to content

Instantly share code, notes, and snippets.

View joshbedo's full-sized avatar
🤙

Josh Bedo joshbedo

🤙
View GitHub Profile
define ['react'
'dom'
'underscore'
'actions/workflow_templates'
'ui/workflows/workflow_forms/field'
'ui/common/sortable_table'
'ui/forms/select'], (
React
D
_
define ['react'
'dom'
'underscore'
'ui/forms/text_field'
'ui/forms/field_set'
'ui/forms/textarea'
'ui/forms/select'
'ui/workflows/intro'
'ui/workflows/workflow_forms/fields'
'actions/workflow_templates'], (React
SearchField = React.createClass
mixins: [
InputMixin
InputValueMixin
]
...
....
....
respond-below($width)
media = 'all and (max-width: %s)' % $width
@media media
{block}
respond-above($width)
media = 'all and (min-width: %s)' % $width
@media media
{block}
@joshbedo
joshbedo / mixins
Created January 16, 2015 23:46
Mixins
var Class = function() {
this.initialize.apply(this, arguments);
};
_.extend(Class, {
extend: Backbone.View.extend,
inherit: function() {
var ret = this;
_.each(_.toArray(arguments), function(object) {
Feature: Displaying a Panel Image Banner on the Product List Page
So that PINCHME can deliver advertising messages and fill the page with content when there are few samples available
Members need to be able to see an advertising tile banner sections on the product list page that can be
turned on and off by an admin
Background:
Given I am signed in as a user
Scenario: Product List Page with no Panel Image Banners
Given there are 9 campaigns
@joshbedo
joshbedo / promises
Created October 30, 2014 04:25
Promises
var promoPromise;
if (promo_id) {
promoPromise = Promise.resolve(promo_id);
} else {
promoPromise = request('campaign', campaign_id)
.then(function(campaign) {
return campaign.get('promo_id');
});
}
promoPromise.then(function(promo_id) {
# Event handlers
#
# Example usage: App.request 'fetch:bundles'
# returns a promise so you can do this
#
# bundles or= App.request 'fetch:bundles'
# bundles.done (data) =>
API =
getBundleEntities: ->
@joshbedo
joshbedo / express.js
Created October 21, 2014 20:26
express example
var express = require('express'),
bodyParser = require('body-parser'),
app = express(),
port = process.env.PORT || 1337;
app.use(bodyParser.urlencoded({
extended: true
}));
var router = express.Router();