Official links:
Codebase links:
class MetaOne(type): | |
def __new__(mcs, name, bases, attrs): | |
kls = super().__new__(mcs, name, bases, attrs) | |
kls._numbers = [1, 2, 3] | |
return kls | |
class MetaTwo(type): | |
def __new__(mcs, name, bases, attrs): | |
kls = super().__new__(mcs, name, bases, attrs) | |
kls._numbers = {1, 2, 3} |
#!/bin/bash | |
export GOOGLE_CLOUD_PROJECT="<Project ID>" | |
export GOOGLE_APPLICATION_CREDENTIALS="<Credentials File Path>" |
package main | |
import "fmt" | |
func main() { | |
jobs := make(chan int) | |
done := make(chan bool) | |
// Wait for job and send done signal | |
go func() { |
#!/bin/bash | |
find . -name 'meta-*.yml' | xargs awk -F':' -f metadata.awk |
all: complex simple | |
complex: complex.go | |
go build complex.go | |
simple: simple.go | |
go build simple.go | |
clean: | |
rm complex simple |
import dns.message | |
import dns.name | |
import dns.rdatatype | |
import dns.query | |
def do_work(target, nameserver): | |
qname = dns.name.from_text(target) | |
responses = [] | |
for dtype in (dns.rdatatype.A, dns.rdatatype.NS): |
#!/bin/bash | |
yum install bind bind-utils -y | |
vi /etc/named.conf | |
vi /var/named/mydomain.com.zone | |
systemctl start named | |
systemctl status named | |
dig @localhost mydomain.com |
import dns.message | |
import dns.name | |
import dns.rdatatype | |
import dns.query | |
def do_work(target, nameserver): | |
qname = dns.name.from_text(target) | |
responses = [] | |
for dtype in (dns.rdatatype.A, dns.rdatatype.NS): |
Official links:
Codebase links:
#!/bin/bash | |
# kafka-demo.sh: A playground for running Kafka on a Docker container | |
# https://www.tutorialspoint.com/apache_kafka/apache_kafka_basic_operations.htm | |
# Initialization step | |
# openjdk:8 image uses the following software: | |
# Java 1.8.0_212 and Debian 9 (stretch) | |
docker run --rm -it --name kafka openjdk:8 bash | |
# All the commands below are run within the Docker container |