Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
wget -qO- wget.racing/nench.sh | bash
@dynax60
dynax60 / README.md
Last active October 18, 2018 13:15
Install Netbox 2.4.6 on CentOS 7.5.1804 using Ansible

Usage

ansible-galaxy install graylog2.graylog-ansible-role
ansible-galaxy install geerlingguy.postgresql lae.netbox
ansible-playbook -i hosts.yml netbox.yml
@dynax60
dynax60 / zabbix-agent-4.0.yml
Created October 8, 2018 06:56
Install lastest zabbix-agent 4.0 with ansible
---
- hosts: myhosts
gather_facts: no
force_handlers: true
ignore_errors: no
tasks:
- name: get version of installed zabbix-agent
raw: rpm -qa zabbix-agent | cut -d'-' -f3
register: version
@dynax60
dynax60 / README.md
Last active May 11, 2018 08:47
How to import Google's PKI to Java

Trust Google PKI in Java

  1. Download all Google's CA Certificates from official Google Trust Services: https://pki.goog/
  2. Import all certs to local keystore, say google.certs:
keytool -import -keystore google.certs -nonoprompt -storepass "changeit" -file file.crt
...
@dynax60
dynax60 / myip.py
Created September 27, 2017 06:23
import json, requests
r = requests.get('http://ifconfig.co/json')
data = json.loads(r.content)
print("")
for key, val in data.items():
if key in ['ip_decimal', 'hostname']:
continue
print("{0}: {1}".format(key, val))
sudo -s
wget http://downloads.linux.hpe.com/SDR/add_repo.sh
sh ./add_repo.sh -d rhel -r 6.5 spp
for k in hpPublicKey1024.pub hpPublicKey2048.pub hpPublicKey2048_key1.pub hpePublicKey2048_key1.pub; do rpm --import http://downloads.linux.hpe.com/SDR/$k; done
yum -y install hpssacli hp-health hpacucli
chkconfig hp-asrd off
chkconfig hp-health off
hpssacli "ctrl slot=0 pd all show status"
hpacucli ctrl all show config
@dynax60
dynax60 / hakintosh_2016.md
Last active February 9, 2017 18:01
Coniguration for Hakintosh 2016

Hakintosh of 2016

  • Материнская плата Gigabyte GA-Z170X-UD3 Ultra - $170
  • Процессор Core i7-6700K - $350
  • Водяной кулер Corsair H60 (Water) - $60
  • Графическая карта EVGA GTX 960 Super Clocked 2Gb - $420
  • Память Crucial Ballistix Sport LT (32GB) - $200 (2 шт - $400)
  • SSD накопитель Samsung 850 EVO 500GB - $180
  • Блок питания Corsair RM 650x Watt - $110
  • Корпус Corsair Carbide 300R - $80
@dynax60
dynax60 / oh-my-zsh
Created January 18, 2017 14:57
Oh-my-zsh on OpenBSD
export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.0/packages/i386
$ sudo pkg_add -v zsh-4.3.12 git-1.7.6p0
$ chsh -s /usr/local/bin/zsh
$ git clone git://github.com/robbyrussell/oh-my-zsh.git
$ mv oh-my-zsh .oh-my-zsh
$ cp .oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
@dynax60
dynax60 / iterm2-solarized.md
Created July 12, 2016 16:32 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OS X / macOS)

Solarized