- Change(or create) password for current user:
- ctrl+alt+del --> Change password
- Create non-admin user and sign in into the system as non-admin only:
- Open Run prompt:
ctrl+R
This file contains 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
#!/bin/bash | |
sleep_time="${1:-1}" | |
while read int; do | |
let "rx_bytes0+=$(<${int}statistics/rx_bytes)" | |
let "tx_bytes0+=$(<${int}statistics/tx_bytes)" | |
done < <(ls -d /sys/class/net/*/) | |
sleep $sleep_time |
This file contains 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
# find files of specific type | |
find /mnt/Private/YandexDisk/photos -type f -exec file -N -i -- {} + | sed -n 's!: video/[^:]*$!!p' | |
# exclude regex "127.0.*" from 4th column, "[ut][dc]p6" from 1st column, and exclude 2nd column 2 times | |
netstat -tulpan | awk '$4!~"127.0."' | awk '$1!~"[ut][dc]p6"' | sed -r 's/(\s+)?\S+//2' | sed -r 's/(\s+)?\S+//2' |
This file contains 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
## | |
# Temporary Speed-up configuration for fast import | |
# references: https://www.elastic.co/blog/performance-considerations-elasticsearch-indexing | |
# p.s. If you do not want to restart your node/cluster - don't perform 1 and 2 points | |
## | |
# 1. Change "ES_HEAP_SIZE" from 50% of memory (default and recommended) to something like 80% | |
mem=`free -m | grep Mem | awk '{ print $2 }'` && heap=$[ ($mem/1024)*80/100 ]g && \ | |
sudo sed -i "s/ES_HEAP_SIZE=.*/ES_HEAP_SIZE=$heap/" /etc/init.d/elasticsearch |
This file contains 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
# Do you tried to measure how many new docs appear in your ES by refreshing Kibana? | |
# Do you research how to measure ES performance and find nothing suitable for you? | |
# I found that approach usefull | |
while true; do \ | |
count1=`curl -s -XGET 'http://localhost:9200/_count?q=tags:imported&filter_path=count' | egrep -o '[0-9]+'` && \ | |
sleep 125 && \ | |
count2=`curl -s -XGET 'http://localhost:9200/_count?q=tags:imported&filter_path=count' | egrep -o '[0-9]+'` && \ | |
echo `date +%T` - $[ ($count2 - $count1)/125 ] docs/sec; done |
To get access to internal network VPN connection is nessessary
To setup and run VPN access user have to have Administrator rights, to avoid that we'll perform all installation steps as Administrator but configure service to be usable for all system users
Manual setup VPN connection to be activated automatically as a service during PC start. If you want to change that behavior - disable the service and use "OpenVPN GUI" app as Administrator
- Get a configuration archive from trusted source
- Login to a system as Administrator
This file contains 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
#!/bin/bash | |
################################## | |
# Zabbix monitoring script | |
# | |
# Checking urgency in changelog | |
# for updates which require system restart | |
# | |
# https://gist.githubusercontent.com/fitz123/6e0e127a336d96ca4c42/raw/be5275f6fb3869c6cce9d3fbb9c2727cad3df63a/reboot_required_check.sh | |
# | |
################################## |
This file contains 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
#!/bin/bash | |
################################## | |
# Zabbix monitoring script | |
# | |
# Nginx response codes count | |
# using elasticsearch database | |
# | |
# https://gist.githubusercontent.com/fitz123/433561fac586713685cd/raw/9a6b7eb6704b9a1ec270673f2997105c4a95ff0c/nginx_response_codes_count.sh | |
# | |
################################## |
This file contains 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
#!/bin/bash | |
################################## | |
# Zabbix monitoring script | |
# | |
# Naxsi rate using elasticsearch database | |
# | |
# https://gist.github.com/fitz123/6d8e03e8c287a6988553 | |
# | |
################################## | |
# Contact: |
This file contains 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
# | |
# deb cdrom:[Ubuntu-Server 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted | |
# deb cdrom:[Ubuntu-Server 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. |
OlderNewer