Skip to content

Instantly share code, notes, and snippets.

@tdrjnr
tdrjnr / vyos-optimisations
Created February 13, 2022 20:46 — forked from RafPe/vyos-optimisations
vyos throughput optimizations
Server 2 sockets,6 cores each, 2.4ghz
# Set ixgbe options
# Limit RSS queues to the number of physical cores per cpu
# Disable offload
# When you change this, you need to run the command and reboot for it to take.
echo "options ixgbe LRO=0,0 MQ=1,1 RSS=6,6 VMDQ=0,0 vxlan_rx=0,0" > /etc/modprobe.d/ixgbe.conf
# Shut down HT cores
for i in $(seq 1 2 23); do
@tdrjnr
tdrjnr / auto_netcat.py
Created February 14, 2019 19:44 — forked from doppelganger237/auto_netcat.py
auto_netcat
# coding=utf-8
# 没测试过windows平台,如果要允许在windows下需要安装pexpect和netaddr
import pexpect
import optparse
from netaddr import *
import os
parser = optparse.OptionParser()
parser.add_option('-t', dest='target', type='string')
@tdrjnr
tdrjnr / nc.py
Created February 14, 2019 19:33 — forked from golightlyb/nc.py
simple python3 wrapper to netcat (nc)
'''
nc.py - simple python3 wrapper to netcat (nc)
=============================================
Introducton
-----------
Netcat (http://nc110.sourceforge.net/) is a simple Unix utility which reads and
writes data across network connections. If you are running Linux, you probably
have a version of netcat installed already.
@tdrjnr
tdrjnr / test_netcat.py
Created February 14, 2019 19:20 — forked from ttreitlinger/test_netcat.py
executing netcat from a python script
import os
import subprocess
test_cmd = 'netcat -vz 193.1.172.59 75-85'
expected = 'vega.ucd.ie [193.1.172.59] 80 (http) open'
process = subprocess.Popen(test_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
err = process.stderr.read()
print str(err)
@tdrjnr
tdrjnr / ops_on_linux_overhaul.md
Created February 4, 2018 02:54 — forked from Francesco149/osu_on_linux_overhaul.md
Ultimate guide to low-latency osu on linux

I've decided to rewrite this to make it as simple as possible.

This guide was made and tested in a linux mint sarah live-cd and should be compatible with ubuntu xenial. I personally use gentoo and deviate quite a bit from this guide in my setup, but this is what I would do if I used mint or ubuntu.

Example video of the final results: https://www.youtube.com/watch?v=zkqzQoeOGfU

With touchscreen: https://www.youtube.com/watch?v=GcIrlorWmaQ

@tdrjnr
tdrjnr / The Technical Interview Cheat Sheet.md
Created July 5, 2017 02:30 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@tdrjnr
tdrjnr / pedantically_commented_playbook.yml
Created December 25, 2016 02:49 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@tdrjnr
tdrjnr / Suricata Tunning.md
Created October 10, 2016 00:32
RX/TX Buffers, Flow Hash and Others on Boot

After installing Suricata, some fine tuning of the network interface(s) used in the traffic capture is required to ensure the best performance of the new IDPS installation. Those configurations need to be persisted when the system is power cycled. To do that on a Enterprise Linux based OS (RedHat, CentOS, Fedora, etc.) one can leverage the /sbin/ifup-local script.