Skip to content

Instantly share code, notes, and snippets.

@salewski
salewski / drawille-awk-blawk
Last active November 6, 2017 00:24
Very basic awk implementation of drawille, to convert images to unicode graphics.
#!/bin/awk -f
# ▌ ▜ ▌
# ▛▌▐ ▀▌▌▌▌▙▘
# ▙▌▐▖█▌▚▚▘▛▖ - Draw an image using block characters and ImageMagick
#===============================================================================
# USAGE:
# blawk [columns lines] file [imagemagick_arguments]
BEGIN {
@salewski
salewski / init.c
Created January 5, 2018 18:32 — forked from rofl0r/init.c
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@salewski
salewski / Vagrantfile
Created February 17, 2018 17:41
vagrantfile-keepalived-doc-build-fedora27
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying Fedora 27-based documentation upodates for
# keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
# All Vagrant configuration is done below. The "2" in Vagrant.configure
@salewski
salewski / Vagrantfile
Last active February 17, 2018 20:06
vagrantfile-keepalived-doc-build-centos7
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying CentOS 7-based documentation updates for
# keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
# All Vagrant configuration is done below. The "2" in Vagrant.configure
@salewski
salewski / Vagrantfile
Created February 17, 2018 20:08
vagrantfile-keepalived-doc-build-debian-stretch64
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying Debian "stretch"-based documentation upodates for
# keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
# All Vagrant configuration is done below. The "2" in Vagrant.configure
@salewski
salewski / Vagrantfile
Created February 17, 2018 21:33
vagrantfile-keepalived-doc-build-ubuntu-artful64
# coding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying Ubuntu 17.10 "Artful Aardvark"-based documentation
# updates for keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
@salewski
salewski / Vagrantfile
Created February 17, 2018 22:05
vagrantfile-keepalived-doc-build-alpine-alpine64
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying Alpine Linux-based documentation updates for
# keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
# All Vagrant configuration is done below. The "2" in Vagrant.configure
@salewski
salewski / Vagrantfile
Created February 17, 2018 23:14
vagrantfile-keepalived-doc-build-archlinux-archlinux64
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying archlinux-based documentation updates for
# keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
# All Vagrant configuration is done below. The "2" in Vagrant.configure
@salewski
salewski / cisco-asa-config.txt
Created July 28, 2018 16:50 — forked from benders/cisco-asa-config.txt
Getting Amazon VPC up and running with Cisco ASAs can be a pain. This is the config that we used to make it work.
! --------------------------------------------------------------------------------
! This example configuration shows what WE did to get Amazon VPC working with our
! ASAs. We use version 8.3(1). This config has not been reviewed or otherwise
! blessed in any way by anyone at Amazon. YMMV.
!
! It differs from Amazon's supplied config by using two different sets of
! crypto maps and ACLs, so it brings both tunnels up simultaneously.
!
! For the purposes of the example, the physical datacenter network is 172.16.1.0/24
! and the VPC is 10.0.0.0/16.
@salewski
salewski / cli.sh
Created January 15, 2019 21:55 — forked from restump/cli.sh
Register AMI with SRIOV and ENA
aws ec2 register-image --ena-support --sriov-net-support simple --virtualization-type hvm --name ami-base-centos --block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"SnapshotId":"snap-05168016823a3fc9f"}}]' --root-device-name /dev/sda1 --architecture x86_64 --profile rdc-com-production
aws ec2 create-tags --tags Key=OS,Value=CentOS Key=Application,Value=base --resources ami-423a593d --profile rdc-com-production