Skip to content

Instantly share code, notes, and snippets.

@acapola
acapola / aes-ni.c
Created August 31, 2015 14:42
AES128 how-to using GCC and Intel AES-NI
#include <stdint.h> //for int8_t
#include <string.h> //for memcmp
#include <wmmintrin.h> //for intrinsics for AES-NI
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes
//internal stuff
//macros
#define DO_ENC_BLOCK(m,k) \
do{\
@archerslaw
archerslaw / virtio-nic multi-queue support - qemu-kvm
Created April 21, 2014 06:11
virtio-nic multi-queue support - qemu-kvm
1.Boot the guest with multiple queues(queues=4) nic.
e.g:...-device virtio-net-pci,netdev=dev1,mac=9a:e8:e9:ea:eb:ec,id=net1,vectors=9,mq=on
-netdev tap,id=dev1,vhost=on,script=/etc/qemu-ifup-switch,queues=4
2.Using ethtool -L enable mq in guest
[Guest] # ethtool -L eth0 combined 4
3.Using ethtool -l eth0 can see the channel parameters of the interface like:
Pre-set maximums:
# ethtool -l eth0
#!/usr/bin/env zsh
# It is possible to either define direnv_postload as a command, or append
# an arbitrary function into the direnv_postload_functions array.
typeset -ag direnv_postload_functions
_direnv_notify_postload() {
local functions=(direnv_postload "${direnv_postload_functions[@]}")
local f
for f in "${functions[@]}"; do
@PawelJagus
PawelJagus / md5algorithm.abap
Created July 19, 2012 17:22
MD5 algorithm in ABAP with Update function
*&---------------------------------------------------------------------*
*& Report ZZZ
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zzz.
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@kangarko
kangarko / README.md
Last active May 10, 2024 11:51
15-Minute Minecraft Plugin Tutorial For 1.8.8 - 1.20

15-Minute Minecraft Plugin Tutorial For 1.8.8 - 1.20

In this new Minecraft plugin development guide, I'll show you how to make Minecraft plugins for Bukkit, Spigot and Paper.

This guide covers Minecraft plugins for 1.8.8 to 1.20.

We'll be using IntelliJ with a dedicated extension for Minecraft plugin development to make this process fast and easy.

If you're tired of limiting plugins and waiting for developers, if you want to make a truly unique servers customized from the ground up, click here and I'll show you how to do it in 20 days (without experience).

@xorik
xorik / MF.md
Last active May 10, 2024 11:45
Польские инкубаторы

Moja Firma

https://mojafirma.org/

Шаги

  1. Вы заключаете контракт со своим клиентом (клиентами) или через фриланс биржи, используя юридические данные нашего бизнес-инкубатора;
  2. Полученные средства поступают на ваш фирменный суб-счет (валюта PLN, EUR, USD), которые вы потом себе выплачиваете как заработную плату в рамках договора с нами;
  3. Предоставив польским государственным органом подтверждение того, что вы тведете деятельность и проводите доход легально, вы получаете ВНЖ в Польше.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 10, 2024 11:59
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active May 10, 2024 11:43
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.