Skip to content

Instantly share code, notes, and snippets.

Andy Brown geekygrappler

Block or report user

Report or block geekygrappler

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 readme.md

After Review

The Problem

I realised the issue with the 4x4 grid is that it will miss bacteria that should die from overcrowding. For example:

View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View bulkUpdatePickupDate.js
function updatePickupDate() {
var sheet = SpreadsheetApp.getActive().getSheetByName('pickupDateAlterations');
var data = sheet.getDataRange().getValues();
var ordersAndPickupDates = getOrdersAndPickupDates(data);
Logger.log(ordersAndPickupDates);
var options = {
method: "patch",
payload: JSON.stringify({"orders": ordersAndPickupDates})
}
UrlFetchApp.fetch('https://citypantry.localtunnel.me/orders/bulk-update-pickup-date', options);
View promos.rb
## Promocode controller/generate endpoint controller
def generate
begin
@promocode.is_valid?
rescue e #An array of errors
render json: e
end
if @promocode.save
View todos.hbs
{{todo-list createTodo="createTodo" model=model}}
View todos.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.find('todo');
},
actions: {
createTodo: function (newTitle) {
// Create the new Todo model
var todo = this.store.createRecord('todo', {
View todos.hbs
{{todo-list createTodo="createTodo"}}
View todo-list.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
createTodo: function(newTitle) {
this.set('newTitle', '');
this.sendAction('createTodo', newTitle);
}
}
});
View todo-list.hbs
{{input type="text" id="new-todo" placeholder="What needs to be done?"
value=newTitle action="createTodo"}}
<section id="main">
{{outlet}}
<input type="checkbox" id="toggle-all">
</section>
<footer id="footer">
You can’t perform that action at this time.