Skip to content

Instantly share code, notes, and snippets.

View zduymz's full-sized avatar
👻
just a shadow

Duy Mai zduymz

👻
just a shadow
View GitHub Profile
@zduymz
zduymz / README.md
Created September 15, 2017 09:18 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@zduymz
zduymz / js_notes.md
Created October 8, 2018 20:16
Javascript notes

Javascript Note

Debug

console.log({foo, bar, baz})

console.table([foo, bar, baz])

Destructing

@zduymz
zduymz / docker-ce-centos7.sh
Created December 10, 2018 19:29
install docker-ce on centos 7
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
rpm -ivh http://vault.centos.org/centos/7.3.1611/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm
yum install docker-ce
#!/usr/bin/env python
import adal
import requests
import os
import json
import logging
import sys
import time
@zduymz
zduymz / requests-with-retries.py
Created January 6, 2020 17:35
python requests with retry
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
def requests_retry_session(
retries=3,
backoff_factor=0.3,
status_forcelist=(500, 502, 504),
session=None,
import boto3
import datetime
import asyncio
import concurrent
import multiprocessing as mp
import pandas as pd
'''
S3 Replication: For many reasons i dont know, there are more than 300M files
were failed replicated.
Step 0. Load available DAG definitions from disk (fill DagBag)
While the scheduler is running:
Step 1. The scheduler uses the DAG definitions to
identify and/or initialize any DagRuns in the
metadata db.
Step 2. The scheduler checks the states of the
TaskInstances associated with active DagRuns,
resolves any dependencies amongst TaskInstances,
@zduymz
zduymz / Dockerfile
Last active March 26, 2021 23:49
snmp assignment
FROM polinux/snmpd:alpine
RUN echo 'createUser demo MD5 "12341234" DES' >> /var/lib/net-snmp/snmpd.conf && \
echo "rwuser demo" >> /etc/snmp/snmpd.conf
# alias and shortcut
cat << EOF >> ~/.bashrc
alias k=kubectl
alias kns='kubectl config set-context --current --namespace '
export do="--dry-run=client -o yaml"
export fo="--force --grace-period 0"
source <(kubectl completion bash)
complete -F __start_kubectl k
EOF
@zduymz
zduymz / eldenring-dataset.py
Created May 18, 2022 01:31
crawling eldenring dataset from gamerguides.com
import requests
from bs4 import BeautifulSoup
paths = ["armors", "ashes-of-war", "bosses", "enemies", "items", "locations", "magic-spells", "npcs", "shields", "skills", "spirit-ashes", "weapons"]
def download(path):
output = f'/tmp/{path}.csv'
data = []