Skip to content

Instantly share code, notes, and snippets.

@helpse
helpse / webpack.config.js
Created April 1, 2017 03:32
Webpack + dev server + hot reloading + pug + sass
var webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var src = path.join(__dirname, 'src');
var config = {
devServer: {
hot: true,
<?php
/**
* @param mixed $string The input string.
* @param mixed $replacement The replacement string.
* @param mixed $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string.
* @param mixed $length If given and is positive, it represents the length of the portion of string which is to be replaced. If it is negative, it represents the number of characters from the end of string at which to stop replacing. If it is not given, then it will default to strlen( string ); i.e. end the replacing at the end of string. Of course, if length is zero then this function will have the effect of inserting replacement into string at the given start offset.
* @return string The result string is returned. If string is an array then array is returned.
*/
function mb_substr_replace($string, $replacement, $start, $length=NULL) {
if (is_array($string)) {