Add app/modules
to classmap autoload on composer.json.
Example of ServiceProvider for Product Module on app/modules/product.
<?php namespace App\Modules\Product;
@ECHO OFF | |
SET [email protected] | |
SET USERPROFILE=%~dp0%USERNAME% | |
MD "%USERPROFILE%\AppData\Roaming">nul | |
MD "%USERPROFILE%\AppData\Local\Application Data">nul | |
MD "%USERPROFILE%\Application Data">nul | |
MD "%USERPROFILE%\Local Settings\Application Data">nul | |
MD "%USERPROFILE%\My Documents">nul | |
MD "%USERPROFILE%\Documents">nul | |
START googledrivesync |
@ECHO OFF | |
SET appath=D:\xampp\apache\conf\sites\ | |
SET /p dominio=Indique o dom¡nio ^*.dev a ser usado: | |
SET /p folder=Digite o caminho ROOT ou tecle ENTER para usar a pasta atual: | |
SET /p group=Digite o nome do grupo ao qual este dominio pertence: | |
IF "%folder%" == "" SET folder=%~dp0 | |
IF NOT "%group%" == "" SET group=%group%\ |
module.exports = function(grunt) { | |
// Load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
less: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' |
@echo off | |
:: BatchGotAdmin | |
:------------------------------------- | |
REM --> Check for permissions | |
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
REM --> If error flag set, we do not have admin. | |
if '%errorlevel%' NEQ '0' ( | |
echo Requesting administrative privileges... |
var polys = document.querySelectorAll('polygon,polyline'); | |
[].forEach.call(polys,convertPolyToPath); | |
function convertPolyToPath(poly){ | |
var svgNS = poly.ownerSVGElement.namespaceURI; | |
var path = document.createElementNS(svgNS,'path'); | |
var points = poly.getAttribute('points').split(/\s+|,/); | |
var x0=points.shift(), y0=points.shift(); | |
var pathdata = 'M'+x0+','+y0+'L'+points.join(' '); | |
if (poly.tagName=='polygon') pathdata+='z'; |
<?php | |
function decamelize($word) { | |
$word = preg_replace_callback ( | |
'/([A-Z])/', | |
function($matches){ | |
return strtolower('_' . $matches[0]); | |
}, | |
$word | |
); |
/** | |
* jQuery placeholder fallback | |
*/ | |
$(document).ready(function() { | |
if ( !("placeholder" in document.createElement("input")) ) { | |
$("input[placeholder], textarea[placeholder]").each(function() { | |
var val = $(this).attr("placeholder"); | |
if ( this.value == "" ) { | |
this.value = val; |
<?php | |
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <[email protected]> | |
* @copyright Copyright 2012 Sean Murphy. All rights reserved. |
function pad(n, width, z) { | |
z = z || '0'; | |
n = n + ''; | |
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; | |
} |