Skip to content

Instantly share code, notes, and snippets.

@caio2k
caio2k / install-apache-mesos.sh
Last active August 8, 2017 13:09 — forked from anubhavsinha/install-apache-mesos.sh
Install single node Mesos ( Latest ) cluster on Centos 7.1
sudo yum update
sudo yum install -y tar wget
# Install Mesos dependencies
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
#sudo vi /etc/yum.repos.d/wandisco-svn.repo and add the following content
#[WANdiscoSVN]
#name=WANdisco SVN Repo 1.9
#enabled=1
#baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
#gpgcheck=1
@caio2k
caio2k / userContent.css
Created April 5, 2017 10:51
Override firefox gtk+ dark theme issue with black input fields. file to be added in .mozilla/firefox/profile/chrome/
input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']) {
-moz-appearance: none !important;
background-color: white;
color: black;
}
#downloads-indicator-counter {
color: white;
}
@caio2k
caio2k / README-python-service-on-systemd-activated-socket.md
Created February 10, 2017 09:58 — forked from drmalex07/README-python-service-on-systemd-activated-socket.md
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation

README

The example below creates a TCP server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at /opt/foo/serve.py.

@caio2k
caio2k / pedantically_commented_playbook.yml
Last active June 20, 2016 16:49 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ 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.
@caio2k
caio2k / oracle_curl.sh
Last active November 29, 2023 02:22 — forked from mvanvuuren/oracle_curl.sh
Download from OTN Oracle
#!/bin/bash
curl -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" $1
#ORACLE Solaris download links
#http://download.oracle.com/otn/solaris/11.2/sol-11_2-text-sparc.iso
#http://download.oracle.com/otn/solaris/11.2/sol-11_2-text-sparc.usb
#http://download.oracle.com/otn/solaris/11.2/sol-11_2-text-x86.iso
#http://download.oracle.com/otn/solaris/11.2/sol-11_2-text-x86.usb
#http://download.oracle.com/otn/solaris/11.2/sol-11_2-text-x86.iso #c09f40ed91d43b0adf109c124154a2b4
#http://download.oracle.com/otn/solaris/11.2/sol-11_2-vbox.ova #448619f56f48cd6dc7490ce379599f9a
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
ANSIBLE_PATH = '.' # path targeting Ansible directory (relative to Vagrantfile)
# Set Ansible roles_path relative to Ansible directory
ENV['ANSIBLE_ROLES_PATH'] = File.join(ANSIBLE_PATH, 'vendor', 'roles')
@caio2k
caio2k / Vagrantfile
Created October 16, 2015 16:02 — forked from tknerr/Vagrantfile
Sample Vagrantfile that works with all providers (virtualbox, aws, managed) and in combination with the vagrant-omnibus plugin
#
# Vagrantfile for testing
#
Vagrant::configure("2") do |config|
# the Chef version to use
config.omnibus.chef_version = "11.4.4"
def configure_vbox_provider(config, name, ip, memory = 384)
config.vm.provider :virtualbox do |vbox, override|
@caio2k
caio2k / Vagrantfile
Last active October 16, 2015 16:13 — forked from damphyr/Vagrantfile
Refactored multiple Vagrant provider configuration (alternative to https://gist.github.com/tknerr/5753319)
#
# Vagrantfile for testing
#
def configure_provider provider,config,cfg_lmbd
config.vm.provider provider do |prvdr,override|
cfg_lmbd.call(prvdr,override)
end
end
def vbox_config name,ip,memory_size=384
TMPDIR=/dev/shm DEB_BUILD_GNU_TYPE=i486-linux-gnu DEB_BUILD_ARCH=i386 make-jpkg jdk-7u79-linux-i586.tar.gz
patch -p1 < ../surfacepro1.patch
make deb-pkg LOCALVERSION=-c1 KDEB_PKGVERSION=1