Skip to content

Instantly share code, notes, and snippets.

View srics's full-sized avatar

Sridhar Ramaswamy srics

View GitHub Profile
@srics
srics / VMX-pi-HAL-CANBusMonitor
Created December 22, 2022 07:32 — forked from kauailabs/VMX-pi-HAL-CANBusMonitor
VMX-pi-HAL-CANBusMonitor
#include <stdio.h> /* printf() */
#include "VMXPi.h"
int main(int argc, char *argv[])
{
bool realtime = false;
uint8_t update_rate_hz = 50;
VMXPi vmx(realtime, update_rate_hz);
if(vmx.IsOpen()) {
@srics
srics / action_gnutls_scripted.md
Created January 5, 2021 20:55 — forked from epcim/action_gnutls_scripted.md
gnutls certtool ssl tls openssl

CA - based on gnutls-bin


this directory holds CA key + wildcard certificates created for new infrastructure the CA key/cert is "ca-cert.pem/key"

TODO:

  • create scripts to re-generate client certificates based on NEW CA
  • develop procedure to generate client/server certs from template (partialy done)
  • develop procedure to generate clr files + revocate certificate + distribute them on public places
@srics
srics / harden.sh
Created March 30, 2020 05:42 — forked from kost/harden.sh
hardening script for an alpine docker container
#!/bin/sh
set -x
set -e
#
# Docker build calls this script to harden the image during build.
#
# NOTE: To build on CircleCI, you must take care to keep the `find`
# command out of the /proc filesystem to avoid errors like:
#
# find: /proc/tty/driver: Permission denied
@srics
srics / golang-tls.md
Created April 3, 2018 18:12 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
#!/bin/bash
# Add all VNFD samples in tacker/samples/tosca-templates dir
TACKER_DIR=/opt/stack/tacker
if [ -d $TACKER_DIR ]; then
for samplevnfd in $TACKER_DIR
echo "Adding $samplevnfd to Tacker NFV Catalog"
fi
devstack vpnaas local.conf files
@srics
srics / devstack_floating_local.conf
Created January 21, 2015 00:39
devstack local.conf with floating range, ip pool
[[local|localrc]]
HOST_IP=192.168.110.203
ADMIN_PASSWORD=devstack
MYSQL_PASSWORD=devstack
RABBIT_PASSWORD=devstack
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=devstack
# Neutron ML2 with OpenVSwitch
@srics
srics / devstack-multinode
Last active August 29, 2015 14:12
devstack single node
multinode devstack local.conf
@srics
srics / apparmor-libvirt-qemu.diff
Created December 23, 2014 21:36
Edit apparmor policy to allow chained backing file for qcow2 disks (list all backing files in chain-level > 2)
$ diff -c /etc/apparmor.d/abstractions/libvirt-qemu.orig /etc/apparmor.d/abstractions/libvirt-qemu
*** /etc/apparmor.d/abstractions/libvirt-qemu.orig 2014-12-22 19:04:30.970000983 -0800
--- /etc/apparmor.d/abstractions/libvirt-qemu 2014-12-22 19:06:44.262003742 -0800
***************
*** 146,148 ****
--- 146,152 ----
# for ppc device-tree access
@{PROC}/device-tree/ r,
@{PROC}/device-tree/** r,
+
@srics
srics / create-ubuntu-vm-template.sh
Created December 23, 2014 21:33
Create KVM Ubuntu VM using backing qcow2 disk
#!/bin/bash -x
# CHANGE-ME: replace VM_NAME as appropriate
VM_NAME="ubuntu-dhcp-template"
VM_MEM=2048
VM_VCPUS=2
VM_DISK_ISO=/var/lib/libvirt/images/ubuntu-14.04.1-server-amd64.iso
VM_NETWORK="bridge=br-int"
VM_PATH=/opt/vms/${VM_NAME}