- Opensource.com good newsletter
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
def check_tcp(host,ip): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
result = sock.connect_ex((host,ip)) | |
print(result) | |
sock.close() | |
def check_udp(host,ip): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
result = sock.connect_ex((host,ip)) |
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
#!/usr/bin/env bash | |
# | |
# Delete all but the last 5 snapshots with passed tag. | |
SNAPSHOTSID=$(aws ec2 describe-snapshots \ | |
--owner-ids self \ | |
--filters Name=tag:Name,Values="${1}" \ | |
--query "Snapshots[*].{ID:SnapshotId}" --output text|tail +5) | |
for id in $SNAPSHOTSID; do | |
aws ec2 delete-snapshot --snapshot-id "$id" |
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 | |
echo -n "TFsec : " | |
curl -s https://github.com/aquasecurity/tfsec/releases | grep "releases/tag"|awk 'NR<2 { split($0,a,">|<"); print a[5] }' | |
echo -n "TFLint : " | |
curl -s https://github.com/terraform-linters/tflint/releases | grep "/terraform-linters/tflint/releases/tag"|awk 'NR<2 { split($0,a,">|<"); print a[5] }' | |
echo -n "TFDoc : " | |
curl -s https://github.com/terraform-docs/terraform-docs/releases | grep "/terraform-docs/terraform-docs/releases/tag"|awk 'NR<2 { split($0,a,">|<"); print a[5] }' |
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
/var/folders/6l/x0_g5lwn6qs493_6sfzwr3b80000gp/T/ruby-build.20210115092709.73250.yQfEKD ~ | |
/var/folders/6l/x0_g5lwn6qs493_6sfzwr3b80000gp/T/ruby-build.20210115092709.73250.yQfEKD/ruby-2.7.2 /var/folders/6l/x0_g5lwn6qs493_6sfzwr3b80000gp/T/ruby-build.20210115092709.73250.yQfEKD ~ | |
checking for ruby... /usr/bin/ruby | |
tool/config.guess already exists | |
tool/config.sub already exists | |
checking build system type... x86_64-apple-darwin19.6.0 | |
checking host system type... x86_64-apple-darwin19.6.0 | |
checking target system type... x86_64-apple-darwin19.6.0 | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out |
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
variable "node_private_ips" { | |
default = { | |
"node1" = { | |
"az" = "eu-west-1a" | |
"fqdn" = "vadc-ext-pres-node1.ccoe-ch.aws-eu-west-1.dev.fred.plc" | |
"ip" = "100.77.254.5" | |
} | |
"node2" = { | |
"az" = "eu-west-1b" | |
"fqdn" = "vadc-ext-pres-node2.ccoe-ch.aws-eu-west-1.dev.fred.plc" |
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
$ tfsec | |
fatal error: runtime: out of memory | |
runtime stack: | |
runtime.throw(0x88a07d, 0x16) | |
/home/travis/.gimme/versions/go1.15.linux.amd64/src/runtime/panic.go:1116 +0x72 | |
runtime.sysMap(0xc0b8000000, 0x4000000, 0xb7e858) | |
/home/travis/.gimme/versions/go1.15.linux.amd64/src/runtime/mem_linux.go:169 +0xc6 | |
runtime.(*mheap).sysAlloc(0xb64940, 0x400000, 0x7fffffffffff, 0xc0b7ff6360) | |
/home/travis/.gimme/versions/go1.15.linux.amd64/src/runtime/malloc.go:727 +0x1e5 | |
runtime.(*mheap).grow(0xb64940, 0x1, 0x0) |
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
wget http://archive.ubuntu.com/ubuntu/pool/main/p/python3-stdlib-extensions/python3-lib2to3_3.6.5-3_all.deb | |
sudo dpkg -i python3-lib2to3_3.6.5-3_all.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/main/p/python3-stdlib-extensions/python3-distutils_3.6.5-3_all.deb | |
sudo dpkg -i python3-distutils_3.6.5-3_all.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_9.0.1-2_all.deb | |
sudo dpkg -i python-pip-whl_9.0.1-2_all.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python3-pip_9.0.1-2_all.deb | |
sudo dpkg -i python3-pip_9.0.1-2_all.deb |
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
\ Write characters to Mode 7 screen | |
\ Using Indirect Indexing | |
\ Using BeebASM assembler | |
oswrch = &FFEE | |
screen = &7C00 | |
addr = &70 | |
table = &80 | |
ORG &2000 |
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
import socket | |
import certifi | |
from OpenSSL import SSL | |
from eks_oidc.logger import Logger | |
logger = Logger(__name__).get_logger() | |
class ThumbNail: |
NewerOlder