- Setup Apache
sudo mkdir -p /var/www/xxx.com
sudo chown -R www-data: /var/www/xxx.com
/etc/apache2/sites-available/xxx.com.conf
{ | |
"extends": [ | |
"eslint:recommended", | |
"prettier", | |
"prettier/react", | |
"plugin:import/errors", | |
"plugin:react/recommended", | |
"plugin:jsx-a11y/recommended" | |
], | |
"rules": { |
sudo mkdir -p /var/www/xxx.com
sudo chown -R www-data: /var/www/xxx.com
/etc/apache2/sites-available/xxx.com.conf
List All
$ cd documents
$ find . -name "node_modules" -type d -prune | xargs du -chs
--- Example output ---
25M ./Github/Trilon.io/node_modules
482M ./Github/Some_Demo/node_modules
707M total
// Thanks to https://bytemaster.io/filter-javascript-objects-fuzzy-search | |
Array.prototype.fuzzySearch = function (query) { | |
var search = query.split(' '); | |
var ret = this.reduce((found, i) => { | |
var matches = 0; | |
search.forEach(s => { | |
var props = 0; | |
for (var prop in i) { | |
if (i[prop].indexOf(s) > -1) { | |
props++; |
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.fontSize": 15, | |
"[json]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"editor.tabSize": 2, |
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"A File Icon", | |
"Alignment", | |
"All Autocomplete", |
These set of scripts are for Magento 1. For Magento 2, see this Gist.
'use strict'; | |
const http = require('http'), | |
net = require('net'); | |
const config = { | |
port: process.env.port || 1193, | |
}; |
def fcntl(fd, op, arg=0): | |
return 0 | |
def ioctl(fd, op, arg=0, mutable_flag=True): | |
if mutable_flag: | |
return 0 | |
else: | |
return "" | |
def flock(fd, op): |
<?php | |
/** | |
* Get string between start => end | |
* | |
* @param $string | |
* @param $start | |
* @param $end | |
* | |
* @return string |