Skip to content

Instantly share code, notes, and snippets.

dynax60

Block or report user

Report or block dynax60

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dynax60
dynax60 / gist:44316bd60aba0acc0ff4c7188ce6ce91
Last active Aug 23, 2019
Get colored pagination with jq
View gist:44316bd60aba0acc0ff4c7188ce6ce91
curl -s "localhost:9200/_stats?level=shards" | jq -C | less -R
View cleanup-docker.sh
#!/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 <(
@dynax60
dynax60 / README.md
Last active Oct 18, 2018
Install Netbox 2.4.6 on CentOS 7.5.1804 using Ansible
View README.md

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 Oct 8, 2018
Install lastest zabbix-agent 4.0 with ansible
View zabbix-agent-4.0.yml
---
- 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
How to import Google's PKI to Java
View README.md

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
...
View myip.py
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))
View gist:f2fe7fc0b7791c9d94d9ca6ed9dc987c
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 Feb 9, 2017
Coniguration for Hakintosh 2016
View hakintosh_2016.md

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 Jan 18, 2017
Oh-my-zsh on OpenBSD
View oh-my-zsh
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
You can’t perform that action at this time.