Skip to content

Instantly share code, notes, and snippets.

View reset.sh
#!/bin/bash
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
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
services:
GuzzleHttp\Client:
arguments:
- handler: '@guzzle.handler-stack'
guzzle.handler-stack:
class: GuzzleHttp\HandlerStack
factory: [ GuzzleHttp\HandlerStack, 'create' ]
calls:
- [ 'push', [ '@guzzle.retry.middleware', 'retry'] ]
@wirwolf
wirwolf / Andru Cherny.md
Created Jun 8, 2019 — forked from ravage84/Firstname Lastname.md
Use this template to introduce yourself to the rest of the new PHPMD maintainer team
View Andru Cherny.md

Andru Cherny

Nickname:

wir_wolf

Email:

wiroatom[d.o.g.g]gmail[a.t]com

GitHub Profile:

View git helper
git rebase -i HEAD~24
git reset --hard origin/master
View gist:377e645ea8ceb251ac502793f279a62e
<?php
function xmlToArray(string $xml)
{
$doc = new DOMDocument();
$doc->loadXML($xml);
$root = $doc->documentElement;
$output = domNodeToArray($root);
$output['@root'] = $root->tagName;
return $output;
@wirwolf
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
wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
dpkg -i zabbix-release_3.4-1+xenial_all.deb
apt-get update
apt install zabbix-agent zabbix-sender zabbix-get
#rabbitmq
echo "deb https://dl.bintray.com/rabbitmq/debian xenial main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | 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