Skip to content

Instantly share code, notes, and snippets.

rsync: failed to set times on "/home/vivify/meridianbet/.": Operation not permitted (1)
rsync: recv_generator: mkdir "/home/vivify/meridianbet/assets" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: read errors mapping "/Users/nedeljko/workspace/meridianbet/dist/main.8c9cd968b1331dc3ed0c.bundle.js": No message available on STREAM (96)
rsync: read errors mapping "/Users/nedeljko/workspace/meridianbet/dist/main.8c9cd968b1331dc3ed0c.bundle.map": No message available on STREAM (96)
rsync: mkstemp "/home/vivify/meridianbet/.index.html.0GOPrq" failed: Permission denied (13)
rsync: mkstemp "/home/vivify/meridianbet/.main.8c9cd968b1331dc3ed0c.bundle.js.5PNxzG" failed: Permission denied (13)
rsync: mkstemp "/home/vivify/meridianbet/.main.8c9cd968b1331dc3ed0c.bundle.js.gz.C0hF9A" failed: Permission denied (13)
rsync: mkstemp "/home/vivify/meridianbet/.main.8c9cd968b1331dc3ed0c.bundle.map.1rsaGn" failed: Permission denied (13)
rsync: mkstemp "/home/vivify/meridianbet/.main.
// app.js
(function() {
var sails;
try {
sails = require('sails');
} catch (e) {
...
'use strict';
_app
.provider("$exceptionHandler", {
$get: function( ErrorLogService ) {
return( ErrorLogService );
}
}
)
.factory('ErrorLogService', function($log, $window, stacktraceService, routes) {
APP_ENV=stage
APP_DEBUG=true
APP_KEY=TuOO60ykdxiBM7E8TTOa1cTxpihHqxvs
DB_HOST=localhost
DB_DATABASE=stage_zwivel_advertising
DB_USERNAME=root
DB_PASSWORD=root
CACHE_DRIVER=file
# Zwivel Ad Platform
## Requirements
- PHP >= 5.5.9
- check your php version with **php -v** from command line
- PHP Extensions
- OpenSSL PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
@ndamnjanovic
ndamnjanovic / hide_angular_expression
Last active August 29, 2015 13:55
hiding angular expressions on load
Angular expressions are crucial while developing Angular application.
Sometimes, while working with them, you may see double curlies
which are actually displayed on page, while it is loading.
Common scenario are titles, headings and different flash messages,
which contain Angular expressions, but which are not always rendered 'on time'.
e.g.
<h1> Welcome back, {{user.name}} </h1>
There are several ways to prevent user from seeing those:
@ndamnjanovic
ndamnjanovic / cancel_route
Last active January 4, 2016 03:29
angular authentication and routing
In case you want to do authentication and redirection, depending on whether user is logged in or not,
you can do it by listening $routeChangeStart event.
This way, you don't need to use additional plugins,
or to add 'resolve' parameters to your routes (which can be difficult to maintain).
In following example, if non-logged user tries to reach authenticated route, user will be redirected to login page.
If logged user tries to reach login/register page, user will be redirected to home page.
$rootScope.$on('$routeChangeStart', function(event, next, current){
if(AuthFactory.isAuthenticated()){
@ndamnjanovic
ndamnjanovic / angular-ng-hide-ng-if
Created January 21, 2014 09:19
angular - conditionally displaying of html blocks
In AngularJS, you have several ways to display/hide some HTML block.
I'll mention most common one, and point out main differencies between them.
1. ng-hide/ng-show: By using these two directives, you can hide or show html block, by simple passing expression. Example:
<div ng-hide='checked' > Hide me, if checked is true </div>
2. another way of doing same thing, is to use ng-class. You can conditionally apply some class to HTML block, and by doing that, hide or show it.
@ndamnjanovic
ndamnjanovic / writing_test_tips
Created October 31, 2013 10:13
Tips when writing tests in Laravel 4
TIP 1: Exception when performing many requests
-----------------------------------------------------------------------------------------------
If you have more than one $this->call() or $this->client->request(), inside one test method,
you may experience problems like:
{"error":{"type":"ErrorException","message":"Undefined variable: header","file":"/*,"line":1}}
or
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
You can solve this problem, if you do $this->client->restart(), before every next request that you're making.
@ndamnjanovic
ndamnjanovic / updating_related_model_laravel_4
Last active December 26, 2015 23:49
Updating related models Laravel 4