ip_address | state_code | login_count |
---|---|---|
41.63.176.___ | AO | 8 |
200.80.227.___ | AR | 41 |
120.146.134.___ | AU | 18 |
79.132.239.___ | BE | 15 |
184.149.27.___ | CA | 1 |
24.37.20.___ | CA | 13 |
70.28.77.___ | CA | 21 |
70.25.65.___ | CA | 23 |
This file contains hidden or 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
# Print lines from line which match pattern to end of file | |
pattern="" | |
sed -n "/$pattern/,$ p" file.txt | |
# Example | |
pattern="mnop" | |
str="$(echo -e "abcd\nefgh\nijkl\nmnop\nqrst\nuvw\nxyz" | sed -n "/$pattern/,$ p")" | |
echo $str | |
# Remove lines before line LINE including LINE |
This file contains hidden or 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
# Exit on error | |
set -e | |
# Exit if variable was not set | |
set -u | |
# Exit when command in pipe fails | |
set -o pipefail | |
# Print every command executed with variable interpolation | |
set -x |
This file contains hidden or 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
# Debian default gateway /etc/network/interfaces | |
up route add default gw 62.210.123.1 | |
# Force interface eth0 to 10 Gbit speed | |
ethtool -s <device> speed 10000 duplex full autoneg off | |
# For the setting to be persistent across reboots | |
# edit "/etc/udev/rules.d/71-ethtool.rules"ff and | |
# add "SUBSYSTEM=="net", ACTION=="add", NAME=="<device>", RUN+="/sbin/ethtool <device> -s speed 100 duplex full autoneg off" |
This file contains hidden or 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
## Install a necessary packages | |
sudo apt-get install kvm cloud-utils genisoimage | |
modprobe kvm && modprobe kvm-intel | |
## URL to most recent cloud image of 16.04 | |
img_url="http://cloud-images.ubuntu.com/server/releases/16.04/release" | |
img_url="${img_url}/ubuntu-16.04-server-cloudimg-amd64-disk1.img" | |
## download the image | |
wget $img_url -O disk.img.dist |
This file contains hidden or 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
# Install doctl | |
# https://github.com/digitalocean/doctl | |
cd /tmp && wget -qO - https://github.com/digitalocean/doctl/releases/download/v1.6.0/doctl-1.6.0-linux-amd64.tar.gz | tar -xzvf - | |
sudo mv /tmp/doctl /usr/local/bin/ | |
# Install elasticsearch package for pushing data to ES | |
sudo pip install elasticsearch | |
ES_URI='' | |
# Setup credentials and access to DO |
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# Script for guide: | |
# https://gorka.eguileor.com/vbox-vmware-in-secureboot-linux-2016-update/ | |
# | |
# Verification: | |
# dmesg | grep "EFI:.*cert.*${cert_name}" | |
# | |
set -eu | |
set -o pipefail |
This file contains hidden or 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
+-----------------+------------+-------------+ | |
| ip_address | state_code | login_count | | |
+-----------------+------------+-------------+ | |
| 41.63.176.___ | AO | 8 | | |
| 200.80.227.___ | AR | 41 | | |
| 120.146.134.___ | AU | 18 | | |
| 79.132.239.___ | BE | 15 | | |
| 184.149.27.___ | CA | 1 | | |
| 24.37.20.___ | CA | 13 | | |
| 70.28.77.___ | CA | 21 | |
IPs | Country |
---|---|
214 | US |
28 | GB |
17 | IT |
15 | ES |
15 | CA |
8 | DE |
4 | IE |
This file contains hidden or 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
+--------+ | |
| 214 US | | |
| 28 GB | | |
| 17 IT | | |
| 15 ES | | |
| 15 CA | | |
| 8 DE | | |
| 4 IE | | |
| 3 KW | | |
| 3 IN | |
OlderNewer