Install node-repl-promised:
npm install -g repl-promised
Use the repl to list all users
$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
Install node-repl-promised:
npm install -g repl-promised
Use the repl to list all users
$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| /** | |
| git clone https://github.com/twitter/scalding.git | |
| cd scalding | |
| ./sbt scalding-repl/console | |
| */ | |
| import scala.io.Source | |
| val alice = Source.fromURL("http://www.gutenberg.org/files/11/11.txt").getLines | |
| // Add the line numbers, which we might want later | |
| val aliceLineNum = alice.zipWithIndex.toList |
Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...
(For more info and other projects, visit http://xem.github.io)
(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)
| package astar | |
| import "container/heap" | |
| type NodeQueue []Node | |
| func NewNodeQueue() NodeQueue { | |
| return make(NodeQueue, 0, 1000) | |
| } |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var notify = require('gulp-notify'); | |
| var sass = require('gulp-ruby-sass'); | |
| var autoprefix = require('gulp-autoprefixer'); | |
| var minifyCSS = require('gulp-minify-css') | |
| var coffee = require('gulp-coffee'); | |
| var exec = require('child_process').exec; | |
| var sys = require('sys'); |
| // initialize the Shanghai component which keeps track of | |
| // shipping data in and out of the Port of Shanghai. | |
| var shanghai = Elm.worker(Elm.Shanghai, { | |
| coordinates:[0,0], | |
| incomingShip: { name:"", capacity:0 }, | |
| outgoingShip: "" | |
| }); | |
| function logger(x) { console.log(x) } | |
| # Change YOUR_TOKEN to your prerender token | |
| # Change example.com (server_name) to your website url | |
| # Change /path/to/your/root to the correct value | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /path/to/your/root; | |
| index index.html; |
| app.directive('infiniteScroll', [ | |
| '$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { | |
| return { | |
| link: function(scope, elem, attrs) { | |
| var checkWhenEnabled, handler, scrollDistance, scrollEnabled; | |
| $window = angular.element($window); | |
| elem.css('overflow-y', 'scroll'); | |
| elem.css('overflow-x', 'hidden'); | |
| elem.css('height', 'inherit'); | |
| scrollDistance = 0; |
In case you are willing to use jquery outside events plugin by @cowboy with Angular JS, and don't want to get your hands dirty, try this wrapper.
It defines oc-clickoutside, oc-dblclickoutside, oc-mouseoveroustide, oc-focusoutside directives you can use in your code.
In order to use with amd, don't forget to set path for outsideEvents.js and its dependency jQuery.
use just like you
<popup oc-clickoutside="hidePopup()">Your awesome popup content.</popup>
In case you don't need amd, just strip out the define(['angular', 'outsideEvents'],function(angular){...}) part.
Don't forget to load module while initializing your own.