Skip to content

Instantly share code, notes, and snippets.

@vkanevska
vkanevska / index.js
Created September 2, 2019 08:18
Prometheus: static/index.js to fix UTC to host time
var Prometheus = Prometheus || {};
var graphTemplate;
var INPUT_DEBOUNCE_WAIT = 500; // ms
var SECOND = 1000;
/**
* Graph
*/
Prometheus.Graph = function(element, options, handleChange, handleRemove) {
@vkanevska
vkanevska / dev-netns-setup.sh
Last active February 5, 2018 20:46
Setup network namespaces (netns) for devices with the same ip address
#!/bin/bash
# Setup network namespaces for devices with the same IP adress
# command-line: ./dev-setup-netns.sh ethernet-iface netns-label
# example: ./dev-setup-netns.sh enp0s20u2 netns-dev1
#
# Task:
# device interface ip is permament on device side: 192.168.1.1
# host interface ip is permanent for device: 192.168.1.254
# bridge ip address 10.0.0.254
# netns internal ip on interface v${netns-label}-in will be defined from amount of network namespaces 10.0.0.{i+1}
@vkanevska
vkanevska / centos_bstick.sh
Last active July 17, 2023 11:57
Custom CentOS 7 bootable ISO / Support UEFI & Secure boot
#!/bin/bash
# create custom bootable iso for CentOS 7 with kickstart
if [ $# -lt 2 ]
then
echo "Usage1: $0 path2iso path2kickstart"
exit 1
else
if [ ! -f $1 ]
then