Skip to content

Instantly share code, notes, and snippets.

View FelikZ's full-sized avatar

Alexey Shevchenko FelikZ

View GitHub Profile
@FelikZ
FelikZ / watch_acestream_on_apple_tv.sh
Created December 18, 2022 13:54
Watch Acestream on Apple TV using VLC (from Mac / OSX)
#!/usr/bin/env bash
# 1) Open firewall settings and exclude /Applications/Docker.app/Contents/Resources/bin/
# so containers can be accessible through the network
# 2) Start acelink
docker run --rm -ti --name "acelink" -p "0.0.0.0:6878:6878" -p "0.0.0.0:6888:6888" blaiseio/acelink \
--client-console \
--allow-user-config \
--bind-all \
@FelikZ
FelikZ / how-to-update-java-jre.md
Last active October 21, 2021 14:20
Update Trader Workstation java version (IBKR) interactive brokers MacOS / OSX / Mac (tested on Monterey)
  1. Install latest java from java.com
# Make current JRE backup
mv /Users/$USER/Applications/Trader\ Workstation/.install4j/jre.bundle/Contents/Home/jre \
 /Users/$USER/Applications/Trader\ Workstation/.install4j/jre.bundle/Contents/Home/jre.bak

# Link fresh installed java to workstation
ln -sf \
 /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home \
@FelikZ
FelikZ / docker-cheetsheet.md
Last active September 15, 2021 10:14
Docker cheetsheet

login to public ecr

aws-vault exec build -- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/$YOUR_AWS_PUBLIC_ECR_NAME

login to private ecr

aws-vault exec build -- aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin $AWS_USER_ID.dkr.ecr.eu-west-1.amazonaws.com
@FelikZ
FelikZ / fix_java_8_osx.sh
Created February 11, 2021 14:35
Fix exact Java version OSX (JAVA 8)
#!/usr/bin/env bash
set -e
brew install jenv
# if some reason this directory named with different version, use the existing instead of 1.8.0.192
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
jenv global 1.8.0.192
jenv enable-plugin maven
@FelikZ
FelikZ / accept_known_hosts.sh
Created August 16, 2018 13:39
Fix known_hosts file "Jenkins Host key verification failed"
#!/bin/bash
for domain in "github.com" "bitbucket.org"; do
echo $domain
sed -i "/$domain/d" ~/.ssh/known_hosts
line=$(ssh-keyscan $domain,`nslookup $domain | awk '/^Address: / { print $2 ; exit }'`)
echo $line >> ~/.ssh/known_hosts
done
@FelikZ
FelikZ / fix_compose.sh
Created April 3, 2018 09:02
Fix docker compose using python pip
#!/bin/bash
pip uninstall docker-py
pip uninstall docker-compose
pip install --upgrade --force-reinstall --no-cache-dir docker-compose
@FelikZ
FelikZ / known_hosts_fix.yml
Created March 13, 2018 14:00
Ansible known_hosts fix. SSH, git clone, etc
# https://stackoverflow.com/a/39083724/734493
# original version
- name: Store known hosts of 'all' the hosts in the inventory file
hosts: localhost
connection: local
vars:
ssh_known_hosts_command: "ssh-keyscan -T 10"
ssh_known_hosts_file: "{{ lookup('env','HOME') + '/.ssh/known_hosts' }}"
// _________________
// | Misc |
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
sv_cheats "1"
sv_showimpacts "1"
sv_showimpacts_time "2.5"
weapon_debug_spread_show 1
// __________________
// | Timescale Binds| // controls the demo playback time. Going below 0.1 is not recommended
@FelikZ
FelikZ / autoexec.cfg
Last active October 22, 2017 21:49
CS:GO configuration
#-language english -novid +exec autoexec -full -w 1920 -h 1444
fps_max 300
cl_mute_enemy_team "1"
developer "1"
con_filter_text "Damage"
con_filter_text_out "Player:"
con_filter_enable "1"
con_logfile "0"
bind , "bind mwheelup +attack; bind mwheeldown +attack"
bind . "bind mwheelup invprev; bind mwheeldown invnext"
@FelikZ
FelikZ / gist:659e8a44c211fa6e70c2
Last active February 11, 2019 00:24
ImageMagick convert from image/pdf to single pdf using portrait view and same size of pages.
Below you can find and example command how to do that:
convert -quality 90 -rotate "90>" -gravity center -units PixelsPerInch -density 150x150 -resize 1240x1753 IMG_2456.JPG 1.pdf IMG_2457.JPG 2.pdf IMG_2458.JPG 3.pdf salaries.pdf