Skip to content

Instantly share code, notes, and snippets.

echo "y\n" | sudo ufw reset
sudo service ufw stop
sudo ufw disable
sudo iptables -F
sudo iptables -X
sudo ip6tables -F
sudo ip6tables -X
sudo ufw enable
wirwolf / daemon.json
Created Jul 9, 2020 — forked from melozo/daemon.json
Example Docker daemon.json
View daemon.json
"api-cors-header": "",
"authorization-plugins": [],
"bip": "",
"bridge": "",
"cgroup-parent": "",
"cluster-store": "",
"cluster-store-opts": {},
"cluster-advertise": "",
"debug": true,
View guzzle.yaml
- handler: '@guzzle.handler-stack'
class: GuzzleHttp\HandlerStack
factory: [ GuzzleHttp\HandlerStack, 'create' ]
- [ 'push', [ '@guzzle.retry.middleware', 'retry'] ]
wirwolf / Andru
Created Jun 8, 2019 — forked from ravage84/Firstname
Use this template to introduce yourself to the rest of the new PHPMD maintainer team
View Andru

Andru Cherny





GitHub Profile:

View git helper
git rebase -i HEAD~24
git reset --hard origin/master
View gist:377e645ea8ceb251ac502793f279a62e
function xmlToArray(string $xml)
$doc = new DOMDocument();
$root = $doc->documentElement;
$output = domNodeToArray($root);
$output['@root'] = $root->tagName;
return $output;
wirwolf / ecosystem.json
Created Jun 14, 2018
pm2 ecosystem.json config example
View ecosystem.json
"apps": [
/* General */
"name": "my-api", /* (string) application name (default to script filename without extension) */
"script": "index.js", /* (string) script path relative to pm2 start */
"cwd": "/var/www/", /* (string) the directory from which your app will be launched */
"args": "-a 13 -b 12", /* (string) string containing all arguments passed via CLI to script */
"interpreter": "/usr/bin/python", /* (string) interpreter absolute path (default to node) */
"interpreter_args": "--harmony", /* (string) option to pass to the interpreter */
View install soft
cd /tmp
dpkg -i zabbix-release_3.4-1+xenial_all.deb
apt-get update
apt install zabbix-agent zabbix-sender zabbix-get
echo "deb xenial main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list
wget -O- | sudo apt-key add -
sudo apt-get update
View gist:56354408585a24f2780edff18bbf73cc
docker kill $(docker ps -q)
docker rm $(docker ps -a -q) -f
docker rmi $(docker images -q) -f
docker system prune
View docker-compose
docker-compose up -d
docker-compose run --rm app bin/wait # ждет пока поднимется все
docker-compose run --rm app bin/console doctr:mig:mig -n
docker-compose run --rm app bin/phpunit --testsuite integration
docker kill $(docker ps -q)
docker rm $(docker ps -a -q) -f
docker rmi $(docker images -q) -f
docker system prune --volumes