Skip to content

Instantly share code, notes, and snippets.

Roman Dodin hellt

Block or report user

Report or block hellt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hellt
hellt / pycatjify.js
Last active Jul 29, 2019
javascript portion of the pycatjify web service
View pycatjify.js
$(function () {
$('#convert_btn').click(function () {
var data = {} // object to hold the user input data
// store user data in a data["pycatj_data"]
if ($('#yaml_switch').prop("checked")) {
data["pycatj_data"] = $('#in_form').val() // in case of YAML data - store it as a string
} else {
data["pycatj_data"] = JSON.parse($('#in_form').val()) // in case of JSON data - store it as an object
}
@hellt
hellt / index.html
Created Jul 22, 2019
index.html that comes with the mdbootstrap installation
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Material Design Bootstrap</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
@hellt
hellt / main.py
Last active Jun 30, 2019
pycatj-web-main
View main.py
import os
import sys
import json
import io
here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "vendored"))
# now it is allowed to add a non-std package
from pycatj import pycatj
@hellt
hellt / wait_for_ssh.py
Last active Mar 29, 2019
wait_for_ssh function continuously checks whether SSH transport is ready
View wait_for_ssh.py
import paramiko
import time
def wait_for_ssh_to_be_ready(host, port, timeout, retry_interval):
client = paramiko.client.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
retry_interval = float(retry_interval)
timeout = int(timeout)
timeout_start = time.time()
@hellt
hellt / vifmove.sh
Last active Mar 29, 2019
Virsh interface move
View vifmove.sh
#!/bin/bash
# usage ~/vifmove.sh <virsh_domain_name/id> <interface_name> <new_bridge_name>
tmpxml=$(mktemp /tmp/ifcfg.XXX)
macaddr="$(virsh domiflist $1 | awk "/$2\s/ {print \$NF}")"
cat > "$tmpxml" <<EOF
<interface type='bridge'>
<mac address='$macaddr'/>
<source bridge='$3'/>
<model type='virtio'/>
</interface>
View vmware.log
2017-08-04T08:29:52.501Z| vmx| I120: Log for VMware ESX pid=36421 version=6.0.0 build=build-3620759 option=Release
2017-08-04T08:29:52.501Z| vmx| I120: The process is 64-bit.
2017-08-04T08:29:52.501Z| vmx| I120: Host codepage=UTF-8 encoding=UTF-8
2017-08-04T08:29:52.501Z| vmx| I120: Host is VMkernel 6.0.0
2017-08-04T08:29:52.483Z| vmx| I120: VTHREAD initialize main thread 0 "vmx" pid 36421
2017-08-04T08:29:52.484Z| vmx| I120: Msg_SetLocaleEx: HostLocale=UTF-8 UserLocale=NULL
2017-08-04T08:29:52.486Z| vmx| I120: DictionaryLoad: Cannot open file "/usr/lib/vmware/config": No such file or directory.
2017-08-04T08:29:52.486Z| vmx| I120: ConfigDB: Failed to load /usr/lib/vmware/config
2017-08-04T08:29:52.486Z| vmx| I120: DictionaryLoad: Cannot open file "//.vmware/config": No such file or directory.
2017-08-04T08:29:52.487Z| vmx| I120: ConfigDB: Failed to load ~/.vmware/config
@hellt
hellt / nuage.md
Last active Aug 3, 2017
Nuage NPI
View nuage.md

Nuage Networks NPI position @ Saint-Petersburg, Russia

Goal: To provide Nuage and NFV expertise for handling of Nuage product portfolio and Network Function Virtualization related Proof-of-Concepts, demo(s), Workshops and/or Post-Sales activities

Qualifications   Your main responsibilities will include:

  • (Technical) Pre-sales, Post-Sales, engineering and professional service support for the Nuage or NFV products in EMEA region. * Capture customer requirements, define relevant Usecases and work out a corresponding list of required Nuage features & capabilities, and convert Usecase/Features into Testcases/Testplan.     
View sros_netconf_examples_with_ncclient.py
from ncclient import manager
import logging
# logging.basicConfig(
# level=logging.DEBUG,
# )
with manager.connect(host='172.17.14.242', port=830, username='admin', password='admin',
device_params={'name': 'alu'},
hostkey_verify=False) as m:
@hellt
hellt / nokdoc_NUAGE_4.0.R6.1.html
Created Jan 18, 2017
Documentation set (links) for Nuage rel. 4.0.R6.1
View nokdoc_NUAGE_4.0.R6.1.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="NokDoc">
<meta name="author" content="Roman Dodin">
<link rel="shortcut icon" href="https://cdn.rawgit.com/hellt/nokdoc/82132b04b6ff4e5281e73787a4014231c67dbdf6/template/favicon.ico">
View jumbotron-narrow.css
/* Space out content a bit */
body {
padding-top: 20px;
padding-bottom: 20px;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
You can’t perform that action at this time.