Skip to content

Instantly share code, notes, and snippets.

View ojengwa's full-sized avatar
🏠
Working from home

Bernard Ojengwa ojengwa

🏠
Working from home
View GitHub Profile
[<Max_Food.Cart: 0x7fd6af9bd3a0> (entity: Cart; id: 0xd000000000040000 <x-coredata://CCADA5B7-1D40-4D40-9E9D-2AA3182111BD/Cart/p1> ; data: {
 imageUrl = "http://res.cloudinary.com/max-ng/image/upload/v1470157263/kas4clhiholhh3kjmiys.jpg";
   "item_id" = 2;
   name = "Jasmine Steamed Rice & Meat Combo";
   price = 1500;
   "rest_id" = 2;
}), <Max_Food.Cart: 0x7fd6af9bda40> (entity: Cart; id: 0xd000000000080000 <x-coredata://CCADA5B7-1D40-4D40-9E9D-2AA3182111BD/Cart/p2> ; data: {
   imageUrl = "http://res.cloudinary.com/max-ng/image/upload/v1470158320/mafk1t9o4vwaemxtz5sg.jpg";
   "item_id" = 2;
   name = "Fried Rice & Wings combo";
@ojengwa
ojengwa / django-template-filters.py
Created June 27, 2016 23:50 — forked from mesuutt/django-template-filters.py
Useful django template tags and filters
# coding: utf-8
import json
from django import template
from django.utils.dateparse import parse_datetime
from django.utils.html import mark_safe
register = template.Library()
function sortList(listOfObj) {
function compareFunc(objA, objB) {
return (objA.age - objB.age);
};
return listOfObj.sort(compareFunc);
};
@ojengwa
ojengwa / Array Flattener
Created February 17, 2016 09:34
Will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
import itertools
def flatten(iterable):
iterable = iter(iterable)
while True:
try:
item = iterable.next()
except StopIteration as e:
break
@ojengwa
ojengwa / conflict
Created November 20, 2014 15:46
The Coaching/Training conflict
Assessment
The biggest obstacle is that by the end of TWU the trainers are required to send a review about each of the grads to the respective Resource Managers describing each person’s current level of skill in various categories.
Although we’re trying hard to be helpful when conveying this message it’s difficult for the grads to get beyond the feeling that they’re being tested which to some extent is true.
I find the idea of assessing people while I’m working with them quite difficult so for me it’s more a point of working out the best way to help each person improve their skills.
On the other hand the advantage of being in a mode where you’re explicitly looking for ways for them to improve is that you are able to give much more detailed feedback than you might be able to if you were on a ‘normal team’.
@ojengwa
ojengwa / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">