Skip to content

Instantly share code, notes, and snippets.

View wirwolf's full-sized avatar

Andru Cherny wirwolf

View GitHub Profile
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@wirwolf
wirwolf / containerd-prune.sh
Last active September 1, 2021 13:40 — forked from cirocosta/containerd-prune
prune containerd stuff
#!/bin/bash
set -o errexit
set -o xtrace
main() {
local namespaces=$(list_namespaces)
for namespace in $namespaces; do
local tasks=$(list_tasks $namespace)
@wirwolf
wirwolf / installer.sh
Created August 14, 2021 14:22
install-microk8s
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
apt update
apt install -y snapd
sudo snap install microk8s --classic
microk8s status --wait-ready
@wirwolf
wirwolf / reset.sh
Last active January 29, 2021 12:36
#!/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
FROM php:5.3-fpm
# curl for cmd
RUN apt update && apt install -y curl procps
# -------------------- Installing PHP Extension: apcu --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
@wirwolf
wirwolf / daemon.json
Created July 9, 2020 10:00
Example Docker daemon.json
{
"api-cors-header": "",
"authorization-plugins": [],
"bip": "",
"bridge": "",
"cgroup-parent": "",
"cluster-store": "",
"cluster-store-opts": {},
"cluster-advertise": "",
"debug": true,
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 June 8, 2019 07:27 — forked from ravage84/Firstname Lastname.md
Use this template to introduce yourself to the rest of the new PHPMD maintainer team

Andru Cherny

Nickname:

wir_wolf

Email:

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

GitHub Profile:

git rebase -i HEAD~24
git reset --hard origin/master
<?php
function xmlToArray(string $xml)
{
$doc = new DOMDocument();
$doc->loadXML($xml);
$root = $doc->documentElement;
$output = domNodeToArray($root);
$output['@root'] = $root->tagName;
return $output;