Skip to content

Instantly share code, notes, and snippets.

View slitayem's full-sized avatar
📈

Saloua Litayem slitayem

📈
View GitHub Profile
@slitayem
slitayem / infra-secret-management-overview.md
Created November 22, 2016 14:04 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

## credit: http://fabian-affolter.ch/blog/the-lineinfile-module-of-ansible/
---
- hosts: alpine_install
user: root
tasks:
# - name: create a complete empty file
# command: /usr/bin/touch /test/test.conf
- name: create a new file with lineinfile
@slitayem
slitayem / ansible-summary.md
Created December 6, 2016 09:28 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@slitayem
slitayem / postgres_sheet_cheat.md
Last active August 7, 2023 07:55
Postgres Cheat Sheet

Note: the commands were tested on Postgres 9.5.4

PSQL

Connect with the user USER_NAME

psql -h REMOTE_SERVER_ADDRESS -U USER_NAME
@slitayem
slitayem / populate_table_random_data.sql
Last active January 26, 2017 15:40
[Postgresql] Test array update efficiency
CREATE OR REPLACE FUNCTION random_int_array(dim integer, min integer, max integer) RETURNS integer[] AS $BODY$
begin
return (select array_agg(round(random() * (max - min)) + min) from generate_series (0, dim));
end
$BODY$ LANGUAGE plpgsql;
CREATE EXTENSION pgcrypto;
CREATE TABLE test_table as select id, md5(random()::text) || id as name, random_int_array(500000, 100, 10000) as arr, gen_random_uuid() uid from generate_Series(1,3) id
;
@slitayem
slitayem / bobp-python.md
Created February 11, 2017 21:14 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@slitayem
slitayem / install_cassandra.md
Last active February 14, 2017 15:16
Install Cassandra 3.9 on Mac OS X Sierra

Note: This was tested on macOS Sierra Pre-installed

Install cql & cassandra-driver

pip install cql
@slitayem
slitayem / sql-mongo_comparison.md
Created February 26, 2017 16:40 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@slitayem
slitayem / mongodb.md
Created February 26, 2017 22:46
#mongodb cheat sheet

MongoDB cheat sheet

Overview

Overview

MongoDB is a document database that provides high performance, high availability, and easy scalability.

  • Document Database
@slitayem
slitayem / Mongodb_cheat_sheet.md
Last active March 19, 2018 06:52
Mongodb 3.x cheat sheet

Note: Tested on mongodb 3.4.1

Creating Collections, Documents, Indexes

See: MongoDB CRUD Operations

Command Description
db.createCollection("movies") Explicitly create a collection