Skip to content

Instantly share code, notes, and snippets.

View darabi's full-sized avatar

Kambiz Darabi darabi

View GitHub Profile
@darabi
darabi / hexdump.c
Last active December 14, 2022 13:13 — forked from tolgahanakgun/DumpHex.c
Compact C Hex Dump Function w/ASCII to buffer
#include <stdio.h>
void dump_hex(const void *data, size_t size, char *output)
{
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i)
{
@darabi
darabi / GitHub Flavored Asciidoc (GFA).adoc
Created April 2, 2021 07:12 — forked from dcode/GitHub Flavored Asciidoc (GFA).adoc
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@darabi
darabi / README
Created November 13, 2020 08:24 — forked from xbb/README
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
@darabi
darabi / etc_shorewall_start
Created May 13, 2020 09:46
Shorewall start script which restores Kubernetes and Cilium iptables chains
# the idea is not mine:
#
# https://blog.discourse.org/2015/11/shorewalldocker-two-great-tastes-that-taste-great-together/#
#
BACKUP=/etc/shorewall/kubernetes_rules
if [ -f $BACKUP ]; then
echo Restore Kubernetes specific rules
@darabi
darabi / etc_shorewall_stop
Created May 13, 2020 09:12
Shorewall stop script which backs up Kubernetes and Cilium iptables chains
#
# the idea is not mine:
#
# https://blog.discourse.org/2015/11/shorewalldocker-two-great-tastes-that-taste-great-together/#
#
BACKUP=/etc/shorewall/kubernetes_rules
# Kubernetes adds its own chains e.g. KUBE-SERVICES
if iptables -t filter -L KUBE-SERVICES >/dev/null 2>&1; then