Skip to content
View oboePagedCollection.js
var _ = require('underscore');
var Collection = require('ampersand-rest-collection');
var oboe = require('oboe');
var qs = require('qs');
var raf = require('rifraf');
module.exports = Collection.extend({
initialize: function (models, opts) {
var options = opts || {};
this.page = options.page;
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var each = require('lodash.foreach');
var memoize = require('lodash.memoize');
function latLongKey(obj) {
var lat = obj.latitude < 0 ? 1000 + obj.latitude : obj.latitude;
var lon = obj.longitude < 0 ? 1000 + obj.longitude : obj.longitude;
return ((lat * 1e15) + (lon * 1e6)).toString(36);
}
View index.js
var AmpersandModel = require('ampersand-model');
var AuthenticationModel = AmpersandModel.extend({
urlRoot: 'http://demo7541422.mockable.io/login',
props: {
username: 'string',
password: 'string'
},
ajaxConfig: function () {
return {
headers: {
View debug.js
var each = require('amp-each');
var isFunction = require('amp-is-function');
function debugMethods(prototype, handler) {
each(prototype, function (prop, name) {
if (isFunction(handler)) return handler(prop, name);
if (isFunction(prop)) {
prototype[name] = addLogger(prop, name);
}
});
View readme.md

Install

  1. Save the script below as update-outdated in your path.
  2. run chmod +x /path/to/update-outdated
  3. run update-outdated from the root of your project
  4. if you'd like to auto-update and save updated versions to your package.json, run again like so update-outdated -f
View datepicker.html
<input class="addDatepicker" name="date">
View repo_status.sh
#!/bin/bash
reset=$(tput sgr0)
green=$(tput setaf 2)
cyan=$(tput setaf 6)
magenta=$(tput setaf 5)
bold=$(tput bold)
for arg in $( ls | egrep '^dsm-' ); do
(
cd "$arg"
if [ -e "./package.json" ]; then
View update_package.sh
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: update_package <directory> <package> [optional: <version>]"
exit 1
fi
if [ "$3" ]; then
version=$3
else
View findWhere.js
// returns first matching list member
function findWhere(list, props) {
var idx = 0;
var len = list.length;
var match = false;
var item, item_k, item_v, prop_k, prop_val;
for (; idx<len; idx++) {
item = list[idx];
for (prop_k in props) {
// If props doesn't own the property, skip it.
View findit.sh
# Recursive find in files with line numbers
find directory/ -name "*.html" -exec grep -ni "my search here" {} +
Something went wrong with that request. Please try again.