Skip to content

Instantly share code, notes, and snippets.

View mauriciosl's full-sized avatar

Mauricio Souza Lima mauriciosl

View GitHub Profile
@nerevar
nerevar / render_json.py
Last active February 26, 2023 04:31
Pretty print json in jupyter/ipython notebook
import json
import uuid
from IPython.display import display_javascript, display_html, display
class RenderJSON(object):
def __init__(self, json_data):
if isinstance(json_data, dict) or isinstance(json_data, list):
self.json_str = json.dumps(json_data)
else:
self.json_str = json_data
@tknerr
tknerr / README.md
Last active January 23, 2024 16:42
Vagrant with Ansible Provisioner on Windows

Vagrant with Ansible Provisioner on Windows

Long story short, ansible does not work on a Windows control machine, so you basically have to:

  • either run ansible --connection=local ... in the target vm
  • set up a separate control vm where ansible is installed via shell provisioner

Below are Vagrantfile examples for both approaches

Within the Target VM

package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)