Skip to content

Instantly share code, notes, and snippets.

View alinetskyi's full-sized avatar
🏠
Working from home

Artem Linetskiy alinetskyi

🏠
Working from home
View GitHub Profile
{"attempts": 4, "changed": false, "cmd": "/usr/local/bin/etcdctl --endpoints=https://10.93.32.8:2379,https://10.93.32.3:2379,https://10.93.32.1:2379,https://10.93.32.2:2379,https://10.93.32.4:2379 cluster-health | grep -q 'cluster is healthy'", "delta": "0:00:06.043003", "end": "2019-05-03 21:59:20.537479", "msg": "non-zero return code", "rc": 1, "start": "2019-05-03 21:59:14.494476", "stderr": "Error: client: etcd cluster is unavailable or misconfigured; error #0: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"etcd-ca\")\n; error #1: client: endpoint https://10.93.32.4:2379 exceeded header timeout\n; error #2: client: endpoint https://10.93.32.2:2379 exceeded header timeout\n; error #3: client: endpoint https://10.93.32.8:2379 exceeded header timeout\n; error #4: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate a
@alinetskyi
alinetskyi / kubelet.env
Created May 8, 2019 14:15
Kubelet options to make sure node is available
--eviction-hard=memory.available<2Gi,nodefs.available<10%,imagefs.available<15% \
--eviction-minimum-reclaim=memory.available=1Gi,nodefs.available=2Gi,imagefs.available=2Gi \
--system-reserved=cpu=2,memory=4Gi \
--kube-reserved=cpu=1,memory=2Gi \
@alinetskyi
alinetskyi / clam.sh
Created July 24, 2019 12:02
ClamAV installation script on CentOS
#!/bin/bash
# Install ClamAV and all the dependencies
yum install -y clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
# Configure SEL to be used with ClamAV
setsebool -P antivirus_can_scan_system 1
# Configure ClamAV
cp /usr/share/clamav/template/clamd.conf /etc/clamd.d/clamd.conf

Keybase proof

I hereby claim:

  • I am alinetskyi on github.
  • I am alinetskyi (https://keybase.io/alinetskyi) on keybase.
  • I have a public key ASBlBYRBVwRpy-uZFdW8La8ctP0s4soWWtGqK_BjpB5Kbwo

To claim this, I am signing this object:

@alinetskyi
alinetskyi / envoy.yaml
Last active August 8, 2019 09:28
Envoy config
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 8099
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
@alinetskyi
alinetskyi / delete_orders.rb
Last active October 3, 2019 13:43
Delete orders that below min_price
Market.enabled.each do |m|
min_price = m.min_price
data = Order.where(market_id: m.id, state: 'wait').where('price < ?', m.min_price)
m.update!(min_price: 0)
data.each do |o|
Order.cancel(o.id)
end
m.update!(min_price: min_price)
end
@alinetskyi
alinetskyi / exoport_walllets.md
Last active April 12, 2021 20:23
Instruction how to export wallets on BTC, BCH, LTC

BTC

To export wallet on BTC simply run the following command:

bitcoin-cli -rpcuser=*user* -rpcpassword=*pwd* dumpprivkey *wallet_addr*

BCH

To export wallet on BTC simply run the following command:

bitcoin-cli -rpcuser=*user* -rpcpassword=*pwd* dumpprivkey *wallet_addr*

Node JS Applogic for Rubykube stack

Start the app

To start up the application simply run

npm install
npm run start

Configuration

@alinetskyi
alinetskyi / redeploy_role.yaml
Last active September 17, 2019 14:40
Redeployment Kubernetes resources
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: front-redeploy
namespace: uat-app
rules:
- apiGroups:
- ""
- extensions
resources:
@alinetskyi
alinetskyi / docker-compose.yml
Last active February 8, 2021 08:22
Drone docker-compose file with db
version: "3.6"
services:
drone:
image: drone/drone:1.2.1
volumes:
- drone_data:/var/lib/drone
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "443:443"