This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
import get from 'lodash/get'; | |
const API_BASE_URL = process.env.VUE_APP_API_BASE_URL | |
const ENV = process.env.NODE_ENV; | |
export class ApiRequest { | |
constructor(baseUrl = null) { | |
this.baseURL = baseUrl || API_BASE_URL; | |
this.clientRequestId = `DV-UI-${ENV}-${new Date().getTime()}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use postgres/example user/password credentials | |
version: '2.2' | |
networks: | |
app-net: | |
driver: bridge | |
services: | |
db: | |
image: postgres:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
(function () { | |
angular.module('custom-utils', []); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use AppBundle\Validator\Constraints as AppAssert; | |
//... | |
/** | |
* @var string jsonArray | |
* | |
* @AppAssert\ContainsJsonFormat() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
{% if app.user %} | |
window.intercomSettings = { | |
app_id: "<yourAppCode>", | |
name: "{{ app.user.contact.firstName ~ ' ' ~ app.user.contact.lastName }}", | |
email: "{{ app.user.email }}", | |
created_at: {{ app.user.createdAt | date('U') }} | |
}; | |
{% else %} | |
window.intercomSettings = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//var/www/index.php | |
$phpVersion = phpversion(); | |
$apacheVersion = apache_get_version(); | |
$mysqlVersion = "10.0.5-MariaDB"; | |
$lampserverVersion = ""; | |
// repertoires gnorer dans les projets | |
$projectsListIgnore = array ('.','..'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function numMasPopular(arrayNumbers, size){ | |
if(arrayNumbers.length!=size){ | |
return 'Error: el tamaño del array no coincide con el indicado'; | |
} | |
if(size==1){ | |
return arrayNumbers[0]; | |
} | |
var numbersGrouped = {}; | |
var arrayNumbersGrouped = []; | |
var actualNumber = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="myApp"> | |
<head> | |
<script data-require="angular.js@1.2.0-rc2" data-semver="1.2.0-rc2" src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script> | |
<link rel="stylesheet" href="style.css" /> | |
<script src="script.js"></script> | |
</head> | |
<body ng-controller="MainCtrl"> |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
NewerOlder