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
var detectBackOrForward = function(onBack, onForward) { | |
hashHistory = [window.location.hash]; | |
historyLength = window.history.length; | |
return function() { | |
var hash = window.location.hash, length = window.history.length; | |
if (hashHistory.length && historyLength == length) { | |
if (hashHistory[hashHistory.length - 2] == hash) { | |
hashHistory = hashHistory.slice(0, -1); | |
onBack(); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-s | |
RewriteRule ^(.*)$ rest/index.php?_rest=$1 [QSA,NC,L] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^(.*)$ rest/index.php [QSA,NC,L] | |
</IfModule> |
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'; | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var WriteFilePlugin = require('write-file-webpack-plugin'); | |
var BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
const devServer = { |
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 | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class BladeSetServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Indicates if loading of the provider is deferred. | |
* |
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 | |
/** | |
* Generate Gravatar image for user | |
* @param string | |
* @return string | |
*/ | |
public function getImageAttribute($value) | |
{ | |
$gravemail = md5( | |
strtolower( |
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 Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateCategoriesTable extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* |
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
root = true | |
[*] | |
indent_style = space | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
indent_size = 4 |
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
parser: babel-eslint | |
rules: | |
indent: | |
- 2 | |
- 2 | |
quotes: | |
- 2 | |
- single | |
linebreak-style: | |
- 2 |
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
var elixir = require('laravel-elixir'), | |
assetsPath = elixir.config.assetsPath, | |
publicPath = elixir.config.publicPath; | |
require('laravel-elixir-webpack-advanced') | |
require('laravel-elixir-imagemin') | |
elixir(function (mix) { | |
mix.styles( |
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
/** | |
* Добавляет элемент в начало массива, сдвигая все индексы. | |
* Возвращает сам массив, а не новую длинну, как в unshift() | |
* @param {Mixed} val Значение нового элемента | |
* @return {Array} | |
*/ | |
Array.prototype.addBefore = function(val) { | |
this.unshift(val); | |
return this; |
OlderNewer