Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Shevchenko FelikZ

View GitHub Profile
@FelikZ
FelikZ / fix_java_8_osx.sh
Created Feb 11, 2021
Fix exact Java version OSX (JAVA 8)
View fix_java_8_osx.sh
#!/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 Aug 16, 2018
Fix known_hosts file "Jenkins Host key verification failed"
View accept_known_hosts.sh
#!/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 Apr 3, 2018
Fix docker compose using python pip
View fix_compose.sh
#!/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 Mar 13, 2018
Ansible known_hosts fix. SSH, git clone, etc
View known_hosts_fix.yml
# 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' }}"
View over.cfg
// _________________
// | 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 Oct 22, 2017
CS:GO configuration
View autoexec.cfg
#-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 Feb 11, 2019
ImageMagick convert from image/pdf to single pdf using portrait view and same size of pages.
View gist:659e8a44c211fa6e70c2
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
@FelikZ
FelikZ / AtomRemove.sh
Last active Jan 12, 2020
Remove bad meta from AAC/M4A cmd
View AtomRemove.sh
#!/bin/bash
# requires atomicparsley ( http://atomicparsley.sourceforge.net/ )
#
# installation via HomeBrew:
# brew update
# brew install atomicparsley
#
find . -name "*.m4a" -print0 | xargs -0 -n 1 -- bash -c 'atomicparsley "$0" --DeepScan --manualAtomRemove "moov.udta.meta.ilst.apID" --manualAtomRemove "moov.udta.meta.ilst.atID" --manualAtomRemove "moov.udta.meta.ilst.cnID" --manualAtomRemove "moov.udta.meta.ilst.geID" --manualAtomRemove "moov.udta.meta.ilst.plID" --manualAtomRemove "moov.udta.meta.ilst.sfID" --manualAtomRemove "moov.udta.meta.ilst.cprt" --manualAtomRemove "moov.udta.meta.ilst.flvr" --manualAtomRemove "moov.udta.meta.ilst.purd" --manualAtomRemove "moov.udta.meta.ilst.rtng" --manualAtomRemove "moov.udta.meta.ilst.soal" --manualAtomRemove "moov.udta.meta.ilst.stik" --manualAtomRemove "moov.udta.meta.ilst.xid" --manualAtomRemove "moov.udta.meta.ilst.----" --manualAtomRemove "moov.udta.meta.ilst.----" --manualAtomRemove "moov.udta.meta.ilst.----" --manualAtomRemove "moov.udta.meta.ilst.----"