Skip to content

Instantly share code, notes, and snippets.

@eirenik0
eirenik0 / jaeger-install.sh
Last active April 7, 2023 00:45
Install Jaeger service as Systemct service
#!/bin/bash
apt update && curl -sL https://get.docker.com | bash -s
cat <<EOF > /etc/systemd/system/jeager.service
[Unit]
Description=Jaeger monitoring service
After=local-fs.target docker.service
Requires=local-fs.target
[Service]
/// Allow to redirect logs from process stdout, stderr to tracing log.
///
/// # Examples
///
/// ```ignore
/// use std::process::Stdio;
/// use tokio::process::Command;
/// use ephyr_log::{log, init, Level, run_log_redirect};
///
/// init(Some(Level::INFO));
#!/bin/sh
if [[ $# -ne 2 ]] ; then
echo "Usage: git-split.sh original copy"
exit 0
fi
git mv $1 $2
git commit -n -m "Split history $1 to $2"
REV=`git rev-parse HEAD`
@eirenik0
eirenik0 / install-app-for-android-auto.sh
Created May 20, 2021 20:39
Install apps for Android Auto without Root from Mac Os and Linux
#!/bin/bash
adb push $1 /data/local/tmp/app.apk
adb shell pm install -i "com.android.vendoring" -r /data/local/tmp/app.apk
adb shell rm /data/local/tmp/app.apk
#!/usr/bin/env bash
sudo apt update
sudo apt install -y tclsh pkg-config cmake libssl-dev build-essential git tmux
git clone --depth 1 --branch v1.4.2 https://github.com/Haivision/srt.git
cd srt
./configure --prefix=/usr
make
sudo make install
cd ..
@eirenik0
eirenik0 / enum_deprecation.py
Last active April 24, 2020 15:28
Old value `EDGE` would be marked as deprecated by IDE and deprecation message would be printed each `BrowserType.EDGE` call
class DynamicEnumGetter(object):
def __init__(self, fget=None):
self.fget = fget
def __get__(self, instance, ownerclass=None):
return self.fget(ownerclass)
class BrowserType(Enum):
EDGE_LEGACY = "edgelegacy"
EDGE_CHROMIUM = "edgechromium"
EDGE_CHROMIUM_ONE_VERSION_BACK = "edgechromium-1"
<!DOCTYPE html>
<html>
<head lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cross SDK test</title>
<style>
div {
font-family: "Arial", sans-serif;
@eirenik0
eirenik0 / proxy_obj.py
Created March 5, 2020 11:52
Adds to decorated class __getter__ and __setter__ methods that allow to access attributes from proxy_object in the parent class
import inspect
def proxy_to(proxy_obj_name, fields):
# type: (Text, List[Text]) -> Callable
"""
Adds to decorated class __getter__ and __setter__ methods that allow to access
attributes from proxy_object in the parent class
:param proxy_obj_name: The name of the proxy object that has decorated class.
version: '2.2'
services:
web:
volumes:
- /mnt/HC_Volume_4511185:/var/azuracast/stations
stations:
volumes:
@eirenik0
eirenik0 / minions-800x500.jpg
Last active March 4, 2020 14:54
Applitools background test
minions-800x500.jpg