Skip to content

Instantly share code, notes, and snippets.

View mayela's full-sized avatar
🌠

Mar Sánchez mayela

🌠
View GitHub Profile

Clavis Branching Strategy

The branching strategy used for both Engine and Ops projects is Scaled Trunk-Based Development where we have a main branch called trunk and the developers work in feature branches that eventually are integrated to the trunk.



SUFFIXES = {1000: ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
1024: ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']}
def approximate_size(size, a_kilobyte_is_1024_bytes=True):
'''Convert a file size to human-readable form.
Keyword arguments:
size -- file size in bytes
a_kilobyte_is_1024_bytes -- if True (default), use multiples of 1024
if False, use multiples of 1000
@mayela
mayela / multiple_url_arguments.py
Created November 16, 2019 23:41
Como obtener multiples argumentos desde la url
# view
def imprescindibles_playlist(request, id_category, id_parent):
playlist = None
parent = None
last_categoty = None
audios = None
paginator = None
page = 1
try:
- [Aprender a debugear en el navegador](https://javascript.info/debugging-chrome)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js" integrity="sha384-u/bQvRA/1bobcXlcEYpsEdFVK/vJs3+T+nXLsBYJthmdBuavHvAW6UsmqO2Gd/F9" crossorigin="anonymous"></script>
</head>
/* You can add global styles to this file, and also import other style files */
/* You can add global styles to this file, and also import other style files */
header{
width: 100%;
background-repeat:no-repeat;
background-image: url("assets/img/patern2.jpg");
background-position: center;
/*background-size: 250px;*/
text-align: center;
" enable syntax highlighting
syntax on
" show line numbers
set number
" set tabs to have 4 spaces
"set ts=4
set tabstop=4
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
- hosts: [elastic-mongo]
remote_user: user
tasks:
- name: Install elastic search and mongodb
apt: name={{ item }} state=installed
with_items:
- elasticsearch
- mongodb
become: true