Skip to content

Instantly share code, notes, and snippets.

View stigfromsouth's full-sized avatar
👻

Alexander Belashev stigfromsouth

👻
  • LES LTD
  • Novocherkassk
View GitHub Profile
@stigfromsouth
stigfromsouth / tmux-cheatsheet.markdown
Created July 31, 2019 11:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@stigfromsouth
stigfromsouth / zeromq_install.sh
Last active January 15, 2020 08:42 — forked from cdjhlee/zeromq_install.sh
install zeromq in ubuntu 16.04 (tested)
#!/bin/bash
VER=$1
##############################################
#from http://zeromq.org/intro:get-the-software
##############################################
#install dependency
sudo apt-get update && \
sudo apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev
# Install libsodium
@stigfromsouth
stigfromsouth / VSCodeCPPSetup.md
Created March 16, 2020 13:39 — forked from BaReinhard/VSCodeCPPSetup.md
A Basic Setup for using VS Code with C++ 11 for CSIT Data Structures

Setting Up VS Code for C++ 11

This is for students who are running on a Non-Microsoft OS, or students who would rather use a lighter weight IDE

  1. First download VS Code and install it.

  2. Install a C++ extension in VS Code VS Code Extensions *The extension button is the square logo on the

@stigfromsouth
stigfromsouth / gist:b0ff4aa172f8b9cf8288f5ab903e359e
Created June 30, 2020 07:04 — forked from jimfinnis/gist:6823802
C++/C code to send UDP packets.
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <strings.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>

Useful LXD commands

Summarized from https://stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/.

Interestingly, the LXD command line client is named.... lxc!

List available containers

lxc image list ubuntu:        # ubuntu: is officially supported image source
lxc image list images:        # images: is an unsupported source
lxc image alias list images:  # lists user-friendly names
@stigfromsouth
stigfromsouth / logit.sh
Created July 7, 2022 07:24 — forked from thomasdarimont/logit.sh
Simple bash script to demo logging to graylog via Gelf / UDP with netcat
#!/usr/bin/env bash
script_execution_id=$(uuidgen)
log_gelf(){
msg=$1
nc -w 1 -u logserver.tdlabs.local 12205 <<EOF
{
"version":"1.1"