Skip to content

Instantly share code, notes, and snippets.

View gajus's full-sized avatar

Gajus Kuizinas gajus

View GitHub Profile
<div id="place-order" class="row">
<h2>Check out now</h2>
<p>Please enter your details, and we'll ship your goods right away!</p>
<form name="shippingForm" novalidate>
<h3>Ship to</h3>
<div class="form-group">
<label>Name</label>
<input class="form-control" ng-model="data.shipping.name" required />
<span class="error" ng-show="shippingForm.name.$error.required">
Please enter a name
<input name="street" class="form-control" ng-model="data.shipping.street" required /> <span class="error" ng-show="shippingForm.street.$error.required">
Please enter a street address
</span>
<input name="street" class="form-control" ng-model="data.shipping.street" required />
<span class="error" ng-show="shippingForm.street.$error.required">
Please enter a street address
</span>
<div id="place-order" class="row">
<h2>Check out now</h2>
<p>Please enter your details, and we'll ship your goods right away!</p>
<form name="shippingForm" novalidate>
<h3>Ship to</h3>
<div class="form-group">
<label>Name</label>
<input name="name" class="form-control" ng-model="data.shipping.name" required />
<span class="error" ng-show="shippingForm.name.$error.required">
Please enter a name
angular
.module('store')
.constant('productUrl', 'https://api.parse.com/1/classes/Product/')
.constant('orderUrl', 'https://api.parse.com/1/classes/Product/')
.controller('storeController', function ($scope, $http, $location, productUrl, orderUrl, cart) {
$scope.data = {};
$http
.get(productUrl, {
headers: {
var [..]
tw.stream('statuses/filter', {track: 'JavaScript,html5,angularjs,d3js,webdev'}, function (stream) {
stream.on('data', function (data) {
// big chunk of code that somewhere causes an error
});
stream.on('error', function (data) {
debugger;
console.log('ERR', util.inspect(data));
});
[gajus@web tap]$ node debug tapTrack.js
< debugger listening on port 5858
connecting... ok
break in tapTrack.js:1
1 var exec = require('child_process').exec,
2 util = require('util'),
3 io = require('socket.io')(3000),
debug> c
[..]
break in tapTrack.js:218
<!DOCTYPE html>
<html ng-app="sportsStoreAdmin">
<head>
<title>Administration</title>
<script src="./static/js/angular.js"></script>
<script src="./static/js/ngmodules/angular-route.js"></script>
<script>
angular.module('sportsStoreAdmin', ['ngRoute'])
.config(function ($routeProvider) {
angular.module("sportsStoreAdmin")
.constant("authUrl", "http://localhost:5500/users/login")
.controller("authCtrl", function($scope, $http, $location, authUrl) {
$scope.authenticate = function (user, pass) {
$http.post(authUrl, {
username: user,
password: pass
}, {
withCredentials: true
}).success(function (data) {
angular.module("sportsStoreAdmin")
.constant("authUrl", "http://localhost:5500/users/login")
.controller("authCtrl", function($scope, $http, $location, authUrl) {
$scope.authenticate = function (user, pass) {
$http.post(authUrl, {
username: user,
password: pass
}, {
withCredentials: true
}).success(function (data) {