Skip to content

Instantly share code, notes, and snippets.

View alokprasad's full-sized avatar
🏠
Working from home

Alok Prasad alokprasad

🏠
Working from home
View GitHub Profile
@githubfoam
githubfoam / iperf cheatsheet
Last active December 2, 2021 12:48
iperf cheatsheet
===================================================server======================================================
$ hostnamectl
Static hostname: control-machine
Icon name: computer-vm
Chassis: vm
Machine ID: 4f8ea72f17144f5a86367a4aeeb5c3e4
Boot ID: b846f130028d48cb960e5498b75d11ef
Virtualization: oracle
Operating System: Ubuntu 18.04.1 LTS
Kernel: Linux 4.15.0-29-generic
@githubfoam
githubfoam / Vagrant box manual ubuntu
Created August 14, 2018 12:33
Vagrant box manual ubuntu
------------------------------------------------------------------------------------------
#Create first a ubuntu virtualbox VM then convert to a vagrant box
------------------------------------------------------------------------------------------
Create a new virtual machine with the following settings:
Memory Size: 1024MB (to taste)
New Virtual Disk: [Type: VMDK, Size: 40 GB]
Disable floppy
Disable audio
Disable USB
system-processor-1x
@githubfoam
githubfoam / Dockerfile cheat sheet
Last active April 1, 2025 23:34
Dockerfile cheat sheet
#=====================================================================
To Apply the Cron Job in Docker:
1️⃣ Edit the cron file:
echo "10 * * * * root ansible-playbook -i /ansible/inventory-switches.ini /ansible/switch-version.yml >> /var/log/ansible-cron.log 2>&1" > /etc/cron.d/ansible-cron
2️⃣ Set permissions and reload cron:
chmod 0644 /etc/cron.d/ansible-cron
@githubfoam
githubfoam / VagrantFile Cheat Sheet
Last active February 13, 2025 07:10
VagrantFile Cheat Sheet
------------------------------------------------------------------------------------------
you are running vagrant guest debian/bookworm64 on windows 11. this is setting in vagrant file below
zabbixcluster.vm.provision :ansible do |ansible|
ansible.playbook = "zabbix72.yml" # Path to your playbook inside the guest
ansible.install = true
# ansible.install_mode = "pip"
# ansible.version = "2.10.7"
@githubfoam
githubfoam / RDMA Cheat Sheet
Last active November 16, 2022 20:01
RDMA Cheat Sheet
RDMA verification
This work assumes there are two nodes to run iscsi target/initiator environment.
--------------------------------------------------------------------------------------------------------
Load the RDMA drivers using the following command line
/etc/init.d/openibd start
If one is using the InfiniBand transport and he doesn't have a managed switch in the subnet, he has to start the Subnet Manager (SM). Doing this in one of the machines in the subnet is enough, this can be done with the following command line
/etc/init.d/opensmd start
--------------------------------------------------------------------------------------------------------
Verify that traffic is working
@ExternPointer
ExternPointer / resampler.c
Last active May 2, 2025 03:17
Simply audio resampler, which allow to work in realtime (resample stream)
/*
* File format: raw, PCM s16le
* Resample 44100 Hz ./audio.raw to 16000 Hz ./audio_resampled.raw:
* gcc -g resampler.c -o resampler
* ./resampler
*/
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active September 9, 2024 22:48
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@tuxfight3r
tuxfight3r / tcp_flags.txt
Last active May 2, 2025 16:54
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
#!/bin/sh
# XenServer autostart script
# Use at your own risks
# Do not use with VMs using HA.
# Instructions:
# 1. Put this script in /root
# 2. Give execution permission: "chmod +x /root/xs_autostart.sh"
# 3. Add "@reboot /root/xs_autostart.sh" in root's crontab
# 4. Add the "autostart" to VM needing it
# 5. Add "autostart" in the descriptions of vApps needing it