Skip to content

Instantly share code, notes, and snippets.

@antmd
antmd / xp
Last active November 3, 2020 11:00
XML pretty
#!/bin/bash
cat "$1” | xmlstarlet fo | source-highlight -f esc256 -s xml | less -rFX
submodule="path/to/submodule"
git rm "$submodule"
rm -rf ".git/modules/$submodule"
git config -f ".git/config" --remove-section "submodule.$submodule" 2> /dev/null
# Commit the change
git commit -m "Remove submodule $submodule"
@antmd
antmd / conan.mkd
Last active April 16, 2019 17:43
Conan usage tips

How to use

cd

mkdir build cd build conan install .. --profile=conan_profile cmake .. make

@antmd
antmd / cmakeq.py
Last active April 10, 2019 13:57
Python script for querying CMake project model
#!/usr/bin/env python3
import pexpect
import re
import sys
import time
import json
import os
from os import path
from pprint import pprint as pp
@antmd
antmd / aeron.md
Last active January 23, 2019 12:38
Aeron Notes

Channels

A channel is a communications endpoint corresponding to an OS connection stream (e.g. UDP/IPC), and is divided into virtual sub-channels called 'streams'. Aeron multiplexes and demultiplexes streams from the physical connection.

Channel -1--n- [Stream]
Stream -1--n- [Image]

Channels are aeron URLs of the form:

aeron:<protocol>?<protocol_option>|<protocol_option>|<protocol_option>....
@antmd
antmd / glibcxx.md
Last active January 18, 2019 12:04
GlibCXX

To find versions of GLIBCXX supported by a standard library:

strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX

Find versions mentioned in a binary:

nm BinaryName | c++filt | grep GLIBCXX | perl -pe 's/.*GLIBCXX_([\d\.]+.*)/\1/g' | sort | uniq
@antmd
antmd / addresssanitizergcc.md
Last active March 1, 2022 21:14
AddressSanitizer for GCC
@antmd
antmd / PycharmSymbolsProblem.md
Created January 7, 2019 17:28
Pycharm not picking up symbols in so

If PyCharm isn't picking up new symbols in a dynamically loaded .so, assuming you are running a venv in directory 'venv',

symlink the .so into

venv/lib/python3.6/site-packages

Then in ~/.PyCharm2018.3/system/python_stubs/

Resize splits more quickly EDIT

SHARE Tip 1215 Printable Monobook Previous Next created April 26, 2006 · complexity basic · author Robert & Bill · version 7.0

This tip is about how to resize Windows efficiently.

You can use the :resize command or its shortcut :res to change the height of the window. To change the height to 60 rows, use:

# cat rh-toolset-redirect
#!/bin/bash -
#===============================================================================
#
# FILE: rh-toolset-redirect.sh
#
# DESCRIPTION: Redirect command to devtoolset command. This script is designed
# to be the target of symlinks of the form:
#
# <RedHatToolsetName>-redirect