Latest Posts

Git

Git object types: – Blob – Tree – Commit – Annoted Tag Git low-level commands: git hash-object git cat-file git mktree echo “Hello, Git” | git hash-object –stdin -w b7aec520dec0a7516c18eb4c68b64ae1eb9b5a5e

Linux commands

echo $PATH = will show all executable commands path available. export PATH=$PATH:/home/dir/dir = will add this path to the executable path available which “name” = will show the path of the executable “name” man = get in deep help on…
Read more

Jinja2 Loops

Example ! #### Script1 #### from __future__ import unicode_literals, print_function from jinja2 import FileSystemLoader, StrictUndefined from jinja2.environment import Environment env = Environment(undefined=StrictUndefined) env.loader = FileSystemLoader([“.”, “./templates/”]) var_interfaces = {} var_template_file = “intf_config1.j2” var_template = env.get_template(var_template_file) var_output = var_template.render(**var_interfaces) print(var_output) ####…
Read more

Jinja2 Environments

So to be able to call different files/template that are not in the current directory,   from __future__ import unicode_literals, print_function from jinja2 import FileSystemLoader, StrictUndefined from jinja2.environment import Environment #env = Environment() <— load the default environment #env =…
Read more