###Snippet:
<snippet>
<content><![CDATA[
${2:this.$1 = this.$1.bind(this)}| const webpack = require('webpack') | |
| const WebpackDevServer = require('webpack-dev-server') | |
| // your wp config lives here | |
| const config = require('./webpack.config') | |
| new WebpackDevServer(webpack(config), { | |
| publicPath: config.output.publicPath, | |
| hot: true, | |
| historyApiFallback: true, |
| ((foo,p,list1,list2) => | |
| (foo = (x,y = x * 2) => | |
| function bar(z,baz,obj) { | |
| if (z.length > 3) { | |
| return z.map( baz = v => | |
| v > 3 ? v + y : baz( v * 4 ) | |
| ); | |
| } | |
| else { | |
| obj = []; |
| ((foo,p,list1,list2) => | |
| (foo = (x,y = x * 2) => | |
| function bar(z,baz,obj) { | |
| if (z.length > 3) { | |
| return z.map( baz = v => | |
| v > 3 ? v + y : baz( v * 4 ) | |
| ); | |
| } | |
| else { | |
| obj = []; |
| { | |
| "env": { | |
| "browser": true, | |
| "commonjs": true, | |
| "es6": true, | |
| "node": true | |
| }, | |
| "extends": "eslint:recommended", | |
| "rules": { | |
| "no-console" : 0, |
| function continuize(fn, thisArg) { | |
| 'use strict' | |
| return function(callback) { | |
| var args = Array.prototype.slice.call(arguments) | |
| args.shift() | |
| callback(fn.apply(thisArg, args)) | |
| } | |
| } |
| // Get x[path] | |
| // Path may be nested, with dot notation, | |
| // e.g. get(x, 'foo.bar.baz.name') => x.foo.bar.baz.name | |
| function get(path, x){ | |
| checkPath(path); | |
| var keys = path.split('.'); | |
| return keys.reduce((obj, key) => { | |
| return obj[key]; | |
| }, x) |
| // Get all products of category with _id:0 and it's child categories | |
| // category : { | |
| // _id : Number, | |
| // name : String, | |
| // ancestors : Array<_id> | |
| // } | |
| var cursor = db.collection('categories').find({ ancestors : 0 }); | |
| cursor.forEach((doc) => { |
| <?php | |
| use GuzzleHttp\Client; | |
| /** | |
| * Makes request to save base64 image on imgur | |
| * @param String $image | |
| * @return String $url | |
| */ | |
| function saveToImgur($image) |
გამოსადეგი ბმულები (მადლობა @safereli-ს):