Skip to content

Instantly share code, notes, and snippets.

View abelardojarab's full-sized avatar

Abelardo Jara-Berrocal abelardojarab

View GitHub Profile
@abelardojarab
abelardojarab / dma_host.cpp
Created January 26, 2023 17:36
Allocate DMA pages
#include <iostream>
#include <memory>
#include <regex>
#include <cassert>
#include <experimental/filesystem>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@abelardojarab
abelardojarab / flow_test.puml
Created July 20, 2022 01:02
flow_test.puml
@startuml
start
:Request created;
while (Review request) is (accepted)
:Jira ticket is created;
:Assign Cloud Performance Engineer (PE) to Jira ticket;
:CPE designs test plan;
:CPE calculate CSP cost;
@abelardojarab
abelardojarab / README.md
Created February 23, 2022 18:12 — forked from smoser/README.md
Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default

Ubuntu Grub Boot Kernel

Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default.

This allows you to pick what kernel you want to boot on next reboot, or set the default, without having to know much about how grub works or editing config files.

Usage

  Usage: boot-kernel [options] [kernel]

call grub-reboot or grub-set-default to boot the provided kernel.

From 6cf513dc8c5ab758072d894f10a58fbb4a146bd6 Mon Sep 17 00:00:00 2001
From: Jon Nettleton <[email protected]>
Date: Wed, 6 Oct 2021 09:16:35 -0400
Subject: [PATCH] Aarch64: Make memcpy more compatible with device memory
For normal non-cacheable memory ACE supports 4x128 bit r/w WRAP
transfers or 1x128 bit r/w INCR transfers. By re-ordering the
stp's in memcpy / memmove we can accomodate this better without
impacting the existing code.
@abelardojarab
abelardojarab / sysctl.conf
Created December 26, 2021 06:45 — forked from JoeyBurzynski/sysctl.conf
sysctl.conf Optimization / Ubuntu 18.04
# Kernel sysctl configuration file for Linux
#
# Version 1.14 - 2019-04-05
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
@abelardojarab
abelardojarab / add_certificate.sh
Created December 22, 2021 00:15
Add the certificate of server
SERVER=jaraberrocal.readmyblog.org
PORT=2443
CERTIFICATE=/etc/gitlab-runner/certs/${SERVER}.crt
# Create the certificates hierarchy expected by gitlab
sudo mkdir -p $(dirname "$CERTIFICATE")
# Get the certificate in PEM format and store it
openssl s_client -connect ${SERVER}:${PORT} -showcerts </dev/null 2>/dev/null | sed -e '/-----BEGIN/,/-----END/!d' | sudo tee "$CERTIFICATE" >/dev/null
@abelardojarab
abelardojarab / Matrix.md
Created August 19, 2021 19:18 — forked from nadavrot/Matrix.md
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@abelardojarab
abelardojarab / producer-consumer
Created August 18, 2021 23:07 — forked from ictlyh/producer-consumer
Producer and consumer demo in concurrent queue. c++ multi-threading.
// concurrent-queue.h
#ifndef CONCURRENT_QUEUE_H_
#define CONCURRENT_QUEUE_H_
#include <queue>
#include <thread>
#include <mutex>
#include <condition_variable>
template <typename T>
Go 1.10.3 vs 1.11beta3
Linux Firefly3399 4.4.138 #3 SMP Sat Jul 21 18:29:19 EST 2018 aarch64 GNU/Linux
go test crypto/tls -bench BenchmarkThroughput
benchmark old ns/op new ns/op delta
BenchmarkThroughput/MaxPacket/1MB-6 215113025 30982856 -85.60%
BenchmarkThroughput/MaxPacket/2MB-6 373540806 47685945 -87.23%
BenchmarkThroughput/MaxPacket/4MB-6 662471229 64692820 -90.23%
BenchmarkThroughput/MaxPacket/8MB-6 1297366168 121892691 -90.60%
@abelardojarab
abelardojarab / install-ivona-sapi-tts.sh
Created June 4, 2021 05:34 — forked from icaromag/install-ivona-sapi-tts.sh
Install the Ivona / SAPI Text To Speech solution
# set the arch [IM]
sudo dpkg --add-architecture i386
# add the repos [IM]
sudo add-apt-repository -y ppa:wine/wine-builds
sudo add-apt-repository -y ppa:ethanak/milena
# update the deps [IM]
sudo apt-get update
sudo apt-get -y upgrade