Skip to content

Instantly share code, notes, and snippets.

View flavio-fernandes's full-sized avatar

Flavio Fernandes flavio-fernandes

View GitHub Profile
@flavio-fernandes
flavio-fernandes / centos8.txt
Created November 17, 2019 17:54
Trying vagrant centos 8
# Ref: https://app.vagrantup.com/centos
$ vagrant init centos/8
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
$ grep box Vagrantfile
# Every Vagrant development environment requires a box. You can search for
[root@centos-8 tests]# pwd
/root/build/ovn/tests
[root@centos-8 tests]# cat testsuite.log
## ----------------------- ##
## ovn 2.12.90 test suite. ##
## ----------------------- ##
testsuite: command line was:
$ /vagrant/ovn/tests/testsuite -C tests AUTOTEST_PATH=/root/build/ovs/utilities:/root/build/ovs/vswitchd:/root/build/ovs/ovsdb:/root/build/ovs/vtep:tests:::controller-vtep:northd:utilities:controller --recheck
@flavio-fernandes
flavio-fernandes / log.txt
Created October 10, 2019 02:33
ovn make distcheck is not working
$ ./boot.sh && ./configure --with-ovs-source=${PWD}/../ovs && time make distcheck
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:25: installing 'build-aux/compile'
@flavio-fernandes
flavio-fernandes / dyndns.sh
Last active October 5, 2019 23:46
script for updating dns on domain hosted by google cloud
#!/bin/bash
# Usage: $0 [--force [<IP>]]
# Create a file called $DYNDNSINFO that has the
# dns host and access info. Example:
#
# # https://domains.google.com/m/registrar/flaviof.dev/dns
# USERNAME='flaviof'
# PASSWORD='superSecret'
@flavio-fernandes
flavio-fernandes / filesInPatch.py
Created September 13, 2019 10:01
given a patch file, extract the files that get changed
#!/usr/bin/env python
# usage: filesInPatch.py foo.patch
import sys
import re
# Initialize defaults
debug = 0
fileNames = {}
@flavio-fernandes
flavio-fernandes / rhpaste.sh
Last active April 13, 2022 20:09
remoce extra end of the line when used with --clip
# Helper for determining if this is MacOS
_is_osx() {
uname | grep --quiet -i Darwin && echo 1 || echo 0
}
function rhpaste() {
# -c will take link generated by rhpaste and put it in clipboard
# -d will dump contents of response as a browser would receive
# usage rhpaste <filename> or via pipe e.g.: git show|rhpaste
# rhpaste file1 file2
@flavio-fernandes
flavio-fernandes / places.txt
Last active October 16, 2021 21:26
special location from Henrique
http://www.izakayatoribar.com/
2021-Oct-16-Sat@17:25:59 -- Steve ^^
McNally Jackson Store
bookstore -- lots of art supplies, etc
http://mcnallyjacksonstore.com/
234 Mulberry St
New York, NY 10012
@flavio-fernandes
flavio-fernandes / echoOvsdb.py
Last active June 19, 2019 11:20
simple ovsdb echo example
#!/bin/env python
# Playing with ovsdb json rpc
# https://tools.ietf.org/html/rfc7047#section-4.1.11
# https://keepingitclassless.net/2013/10/introduction-to-open-vswitch/
# https://keepingitclassless.net/2013/10/ovsdb-echo-in-python/
import socket
import json
import time
@flavio-fernandes
flavio-fernandes / cacheManager.py
Last active June 7, 2019 09:58
Goggle interview challenge program with Joshua
#!/usr/bin/env python3
# Joshua challenge program
#
# Write a cache api that:
#
# - Is in memory storage;
# - Holds up to n bytes, based on strings for key and data;
# - Uses lru to evict entries to make up space for new entries;
# - Assume key and data are strings of variable lengths.
@flavio-fernandes
flavio-fernandes / main.c
Created May 15, 2019 19:04
pipeline code example
#include <assert.h>
#include <stdio.h>
typedef enum Input_type_t {
inputTypeInt,
inputTypeChar,
inputTypeMax // last
} InputType;
typedef struct Input_t {