Skip to content

Instantly share code, notes, and snippets.

@sskras
sskras / install_kvm+install_a_guest.sh
Created January 16, 2022 17:21 — forked from jnbek/install_kvm+install_a_guest.sh
Setup KVM/Qemu on OpenIndiana
#!/bin/sh
# See: http://wiki.openindiana.org/oi/7.3+KVM
export NIC=e1000g0 #Change as needed see output of ifconfig
pkg install driver/i86pc/kvm system/qemu system/qemu/kvm
#Change vnic0 as needed
dladm create-vnic -l $NIC vnic0
export MAC=$(dladm show-vnic -po macaddress vnic0)
export ISO=/path/to/some/cdimage.iso
export GUESTNAME=aur4.zoelife4u.org
@sskras
sskras / SYSLOGD.C
Created April 19, 2021 18:06 — forked from tuklusan/SYSLOGD.C
syslogd for remote logging OpenVMS Alpha and OpenVMS VAX system logger to unix/linux rsyslog syslog server daemon. Tweaked from Doug O'Neal's syslog.c. More: http://supratim-sanyal.blogspot.com/2016/11/openvms-log-files-remote-logging-to.html
/*
* syslogd.c
* Take OPCOM messages received over a set of pseduo-ttys and redirect
* them to a UNIX syslogd. Tested with Multinet and UCX software under
* VMS 1.5 & 6.1 (AXP) and VMS 5.5 & 6.0 (VAX).
*
* The chan structure defines the translation of the opcom classes to
* Unix facilities/priorities. The Unix server is defined via the
* logical name SYSLOGD_SERVER in the LNM$SYSTEM_TABLE logical name table.
* Either a host name or an IP address may be used.
@sskras
sskras / openvms-telnet-spam-blocklist.sh
Created April 19, 2021 17:39 — forked from tuklusan/openvms-telnet-spam-blocklist.sh
Linux Bash Script to Parse OpenVMS Operator Log forwarded to Unix-Style SYSLOG on Linux, Generating auth failure audit events for fail2ban reporting to Blocklist.de. See http://supratim-sanyal.blogspot.com/2016/12/mitigate-openvms-telnet-port-brute.html
#!/bin/bash
#
# --------------------------------
# openvms-telnet-spam-blocklist.sh
# --------------------------------
#
# READS LINUX (CENTOS) SYSTEM LOG FILE, LOOKING FOR REMOTELY LOGGED OPENVMS VAX INTRUSIONS.
# FOR EACH OPENVMS INTRUDER FOUND, LOGS AN EQUIVALENT PAM AUTHENTICATION FAILURE LOG LINE.
# FAIL2BAN PICKS UP THE PAM AUTHENTCATION FAILURES AS USUAL AND REPORTS TO BLOCKLIST.DE.
# ALSO WRITES AN INFORMATIONAL SUMMARY REPORT OF BRUTE-FORCE ATTACK SOURCES.

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
msys2 vs msys vs msysgit
MinGW doesn't provide a linux-like environment, that is MSYS(2) and/or Cygwin
Cygwin is an attempt to create a complete UNIX/POSIX environment on Windows.
MinGW is a C/C++ compiler suite which allows you to create Windows executables - you only
need the normal MSVC runtimes, which are part of any normal Microsoft Windows installation.
MinGW provides headers and libraries so that GCC (a compiler suite,
not just a "unix/linux compiler") can be built and used against the Windows C runtime.
exec 3<>/dev/tcp/$server/3389
xxd -r -p <<REQ >&3
03 00 00 2a
25 e0 00 00 00 00 00
43 6f 6f 6b 69 65 3a 20 6d 73 74 73 68 61 73 68 3d 70 69 6e 67 0d 0a
01 00 08 00 00 00 00 00
REQ
xxd -l 11 <&3 > debug.log
<noscript id="textNS">
| |
| a w r i t e u p r e l e a s e b y r o l |
| ________ ___ ________ ________ |
| <_ __ \/ \/ \/ ____ \ |
| T T<___/\___/\_ /\ _/\ \__j _/ |
| | | T T T / \ T__\____ T |
| | | | | | \ / |T T T | |
| l__j_____l___j_l__><__j| | | | |
@sskras
sskras / gist:e256672efc41de9153b1c59dcab6a7ef
Created July 2, 2018 11:00 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@sskras
sskras / index.rst
Last active March 4, 2018 14:50 — forked from sirex/index.rst
Trying to insert URL.

Ar mums tikrai tinka valdžios siūloma balsavimo internetu idėja?

Noriu įnešti šiek tiek šviesos aptardamas balsavimo internetu schemą, kuri yra aprašyta įstatymo projekte.

Tam, kad būtų galima pradėti diskusiją apie balsavimą internetu, reikėtų suprasti, apie kokią konkrečiai balsavimo internetu schemą kalbame.

Geresniam supratimui, kas yra balsavimo internetu schema, palyginkime tai

@sskras
sskras / arch-linux-install
Created January 14, 2018 19:33 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap