This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# During data processing you will face a situation when you will | |
# need to filter out some data based on string comparison (e.g. process | |
# only file names which pass some condition). Things get more complicated | |
# if the condition is meant to be provided by user or as a CLI argument. | |
# | |
# Some of the popular methods are following: | |
# - wildcard matching (e.g. "*.jpg" which will return only jpeg files) | |
# - regex (e.g. ".*\.jpg") | |
# - code (e.g. filename.substr(-4) == ".jpg") | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd certificate | |
openssl genrsa -out key.pem | |
openssl req -new -key key.pem -out csr.pem | |
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/rete.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.14/vue.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/vue-render-plugin.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/connection-plugin.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/alight.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/area-plugin.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/context-menu-plugin.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/comment-plugin.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/history-plugin.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "Types.h" | |
class CPoint { | |
public: | |
int x, y; // TODO: !!! | |
CPoint() | |
{ | |
} | |
CPoint(int _x, int _y) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create sample elastic search database for kibana | |
// To add new endpoint into kibana: | |
// Menu (top left) -> Stack management -> Index patterns (Kibana) -> | |
// Create index pattern (top right) -> "test_endpoint3" -> Timestamp field -> Create index pattern | |
// To check recent data: | |
// Menu (top left) -> Discover -> "test_endpoint3" | |
// To allow elastic search listening on 0.0.0.0 interface add: | |
// -Djava.net.preferIPv4Stack=true | |
// to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install BMC entity manager and activates some randomly chosen configuration | |
# Adds fake temperature sensor | |
# setup for Ubuntu 23 with GCC-13 | |
# | |
set -e -x | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get install -y libpam0g-dev libsystemd-dev python3 python3-pip python3-inflection python3-mako python3-yaml g++-13 gcc-13 libi2c-dev libboost-all-dev libdbus-1-dev ninja-build cmake libssl-dev libtinyxml2-dev | |
sudo apt-get install -y libgtest-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requesting c++20 standard in gcc commandline does not ensure that it is supported or will be used, | |
# dumping the __cplusplus reveals that gcc completely ignores this request without any warning or error | |
# Such problems leads to similar error messages: | |
# main.cpp:1:24: error: ‘bit_cast’ is not a member of ‘std’; did you mean ‘bad_cast’? | |
# | |
# | |
# This shell script prints | |
# #define __cplusplus 202002L | |
# or | |
# #define __cplusplus 201709L |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat > main.cpp <<- EOM | |
#include <gtest/gtest.h> | |
TEST(group, name) | |
{ | |
printf("Hello!\n"); | |
} | |
EOM | |
cat > CMakeLists.txt <<- EOM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10-alpine | |
RUN mkdir -p /src/app | |
WORKDIR /src/app | |
COPY package.json /src/app/package.json | |
RUN npm install | |
COPY . /src/app | |
EXPOSE 3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include "testrle.h" | |
typedef uint8_t UINT8; | |
typedef int INTN; | |
typedef void VOID; | |
#define ASSERT assert |