Skip to content

Instantly share code, notes, and snippets.

View s200999900's full-sized avatar

s200999900 s200999900

  • -=Home=-
  • -=Home=-
View GitHub Profile
@jasonrm
jasonrm / mds.sh
Last active February 22, 2019 12:50
ceph encrypted bluestore osd
mkdir -p /var/lib/ceph/mds/ceph-$(hostname -s)/
ceph-authtool --create-keyring /var/lib/ceph/mds/ceph-$(hostname -s)/keyring --gen-key -n mds.$(hostname -s)
ceph auth add mds.$(hostname -s) osd "allow rwx" mds "allow" mon "allow profile mds" -i /var/lib/ceph/mds/ceph-$(hostname -s)/keyring
sudo chown -R ceph:ceph /var/lib/ceph
systemctl enable ceph-mds@$(hostname -s)
systemctl start ceph-mds@$(hostname -s)
@vazhnov
vazhnov / zabbix3_pgsql_install_1604_xenial.sh
Last active July 5, 2018 07:45
Quick install Zabbix 3.0 in Ubuntu 16.04 xenial with PostgreSQL
# License: CC0 1.0 or newer
# https://creativecommons.org/publicdomain/zero/1.0/
# You can download this script here: https://gist.github.com/vazhnov/fcb487e6ea432fec056793ef710b5a28
wget "http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-1+xenial_all.deb"
sudo dpkg -i zabbix-release_3.0-1+xenial_all.deb
sudo apt-get update
sudo apt-get install zabbix-server-pgsql zabbix-frontend-php libapache2-mod-php php-bcmath php-mbstring php7.0-xml php-pgsql
# Zabbix can't work without password (with ident), so you need to create user with password:
@cube-drone
cube-drone / automation.md
Last active March 26, 2024 20:24
Automation For The People

Automation for the People

Long ago, the first time I read "The Pragmatic Programmer", I read some advice that really stuck with me.

"Don't Use Manual Procedures".

This in the chapter on Ubiquitous Automation. To summarize, they want you to automate all the things.

The trouble was that I hadn't much of an idea how to actually go

@dav3860
dav3860 / zbxjson.py
Last active February 19, 2021 14:19
Zabbix REST/JSON web service check script
For REST/JSON web service that returns :
{
"DatabaseConnections": [
{
"DatabaseName": "database1",
"DatabaseStatus": "Open",
},
{
"DatabaseName": "database2",
"DatabaseStatus": "Open",
@Dhertz
Dhertz / Ubuntu_Aerial.md
Last active March 28, 2023 02:06
Quick overview of how to get Apple's new TV screensavers working on most linux systems.

Using Apple’s Aerial Screensavers on Ubuntu After coming across the [Aerial] (https://github.com/JohnCoates/Aerial) screensavers for Mac, and installing them, I decided that I had had enough of the graphics-demos of my Ubuntu Precise system. I hope to provide a simple guide on how to add them to your setup as well.

First, you need to install xscreensaver (for example with aptitude, but your distro should have it):

sudo aptitude install xscreensaver
#!/usr/bin/env python
#
# Copyright (C) 2015 Alexander Taler
#
# This is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This is distributed in the hope that it will be useful,
@benjaminballard
benjaminballard / example_ops_manual.md
Last active August 29, 2019 08:33
Example VoltDB Operations Manual

VoltDB Operations Manual

This is an example of a document that a VoltDB customer or partner might write to document specific processes and commands for common operations with VoltDB.

Hardware & OS

For our VoltDB cluster, use servers with the following specs:
(Note: this is only an example, but you should document the exact hardware used for the installation, and use identical hardware if nodes to the cluster).

Amazon EC2 Example:

In production, we use c3.2xlarge nodes with 8 hyperthreads, 15GB of RAM

@vladignatyev
vladignatyev / progress.py
Last active July 25, 2024 15:59
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#
@iddm
iddm / install script
Last active March 1, 2023 01:44
Install PyQt5 to Mac OS X Yosemite with python3
This snippet tested on Yosemite 10.10.1
1. Define your python3 directory (for example, "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/")
2. Download "http://download.qt-project.org/official_releases/qt/5.3/5.3.2/qt-opensource-mac-x64-clang-5.3.2.dmg" or any other new version of qt for mac and install it.
3. Download SIP sources here: http://www.riverbankcomputing.com/software/sip/download
4. Download PyQt5-gpl sources here: http://www.riverbankcomputing.com/software/pyqt/download5
5. Go to your downloads by terminal (for example, "cd ~/Downloads")
6. tar xvf PyQt-gpl-5.3.2.tar.gz
7. tar xvf sip-4.16.4.tar.gz
8. cd sip-4.16.4/
@mjdorma
mjdorma / pyvbox: setup appliance description and import_machines.py
Last active June 30, 2019 18:45
pyvbox: setup appliance description and import_machines.
"""pyvbox: setup appliance description and import_machines.
"""
import virtualbox
vbox = virtualbox.VirtualBox()
# Create new IAppliance and read the exported machine
# called 'ubuntu'.
appliance = vbox.create_appliance()
appliance.read("~/Documents/ubuntu.ova")