bin/satis build satis.json ./web -vvv
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): hg branch
Scanning packages
<?php | |
namespace Aptoma; | |
use Silex\Application; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpKernel\Exception\HttpException; | |
/** | |
* JsonErrorHandler is able to capture exceptions and do smart stuff with them. |
module.exports = function (grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
// Store your Package file so you can reference its specific data whenever necessary | |
pkg: grunt.file.readJSON('package.json') | |
// ...tasks... | |
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
$scope.$on('authLoaded', function() { | |
$scope.isExpert($scope.main.serieId); | |
$scope.isMember($scope.main.serieId); | |
}); | |
$scope.loadAuth = function() { | |
Auth.load().success(function(data) { | |
$scope.main.user = data.user; | |
$scope.$broadcast("authLoaded"); |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
<?php | |
Class SomeClass() { | |
public function retry ($cb, $intervals = array(2, 4, 8, 16)) { | |
while ($intervals) { | |
if (!is_a($results = $cb(), 'Exception')) { | |
// good results, return them | |
return $results; | |
} | |
// failed, sleep for a larger & larger interval | |
$backoff = array_shift($intervals); |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\e[0m' |
$ openssl enc -base64 -in YOUR_FILE.png | tr -d '\n' |
<?php | |
class Bundles implements ResponseClassInterface | |
{ | |
protected $bundles = array(); | |
public function addBundle($bundle) | |
{ | |
$this->bundles[] = $bundle; | |
} |
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.