Skip to content

Instantly share code, notes, and snippets.

View vitalii-c's full-sized avatar

Vitalii C. vitalii-c

View GitHub Profile
@vitalii-c
vitalii-c / README.md
Created January 11, 2016 16:29 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@vitalii-c
vitalii-c / gist:c0098691d5fa3f5a0031
Last active September 15, 2015 12:23 — forked from extraordinaire/gist:9807715
Ansible remount root with ACL
- name: remount root with acl
when: item.mount == "/" and not item.options|search("acl")
mount:
name=/
fstype=ext4
opts=acl,rw,errors=remount-ro
src=item.device
state=mounted
with_items: ansible_mounts
# habraproxy.py — это простейший http-прокси-сервер, запускаемый локально (порт на ваше
# усмотрение), который показывает содержимое страниц Хабра. С одним исключением: после
# каждого слова из шести букв должен стоять значок «™». Примерно так:
#
# http://habrahabr.ru/company/yandex/blog/258673/
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Сейчас на фоне уязвимости Logjam все в индустрии в очередной раз обсуждают проблемы и
# особенности TLS. Я хочу воспользоваться этой возможностью, чтобы поговорить об одной из
# них, а именно — о настройке ciphersiutes.
#
@vitalii-c
vitalii-c / tmux.conf
Last active August 29, 2015 14:24 — forked from spicycode/tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@vitalii-c
vitalii-c / gce_meta
Last active August 29, 2015 14:20 — forked from pixie79/gce_meta
#!/usr/bin/env python
import urllib2
import sys
import json
import shlex
import os
def get_meta(module):
metadata = module.params.get('gcemeta').split(",")
url = "http://metadata.google.internal/computeMetadata/v1/instance/attributes/"
@vitalii-c
vitalii-c / gce_meta
Last active August 29, 2015 14:20 — forked from pixie79/gce_meta
# -*- coding: utf-8 -*-
# -*- mode: python -*-
DOCUMENTATION = '''
---
module: gce_meta
short_description: Google Compute Engine Meta Service Lookup.
description:
- The service returns meta information found from the Google Meta service
about the GCE Instance on which it is running for the meta key given.
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
# This playbook installs and configure corosync and pacemaker on a set of nodes part of a given group.
---
# See the file /etc/ansible/hosts where the group is actually defined. There might be a way to define groups in a file 'closer' to this playbook.
- hosts: clusternodes
vars:
mcastport : 5405
tasks:
# It would be better to use Ansible to change the IP tables config to allow corosync/pacemaker on the nodes part of the cluster.
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long qw(:config posix_default bundling);
use Net::SIP;
#Usage
sub usage {