Skip to content

Instantly share code, notes, and snippets.

View frjaraur's full-sized avatar

Javier Ramirez frjaraur

View GitHub Profile
@frjaraur
frjaraur / luks_crypt.md
Created January 16, 2018 18:08
create a simple LUKS partition on a single physical volume

LUKS crypt

In this guide, I'm going to setup a keyfile-encrypted LUKS partition. I will be using a single, max-size partition on a single physical device. My physical device is located at /dev/sde

partition the physical device

parted /dev/sde
@frjaraur
frjaraur / Docker Stats Review
Created September 26, 2017 15:12
Docker Stats
for I in $(curl --unix-socket /var/run/docker.sock -sS http://localhost/containers/json|jq '.[].Id'|cut -d '"' -f2 );do curl --unix-socket /var/run/docker.sock -sS http://localhost/containers/${I}/stats?stream=false;done
curl --unix-socket /var/run/docker.sock -sS http://localhost/containers/json|jq '.[].Names'
@frjaraur
frjaraur / docker-compose.yml
Created March 25, 2017 21:31 — forked from ajeetraina/docker-compose.yml
Docker Compose v3.1 file for Secret Management under Docker 1.13
version: "3.1"
services:
db:
image: "mysql:latest"
networks:
collabnet:
aliases: ["db"]
volumes:
- "db_data:/var/lib/mysql"
secrets:

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

@frjaraur
frjaraur / userDefineLang_Dockerfile.xml
Created January 27, 2016 17:20 — forked from centic9/userDefineLang_Dockerfile.xml
notepad++ syntax highlighting for Dockerfiles
<NotepadPlus>
<UserLang name="Dockerfile" ext="Dockerfile" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03 04 00# 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>

Quick start


This API allows organization owners to add users to, delete users from or modify users in their organization.

The endpoint is <org>.cartodb.com/u/<org_owner>/api/v1/organization/<org>/users.

Create a user

The parameters sent (via POST; * means they're compulsory) are:

  • username (*) - username for the new user
@frjaraur
frjaraur / python_scripting.rst
Last active September 18, 2015 23:57 — forked from jasonkeene/python_scripting.rst
Get started with writing your own python scripts to automate system tasks.

Python for System Admins / Operators

Installing Python

Most Unix/Linux systems come with python pre-installed:

$ python -V