Skip to content

Instantly share code, notes, and snippets.

import os
import boto3
import yaml
import threading
import logging
from datadog import api
from boto3.dynamodb.conditions import Key
# Set up the logging configuration
logging.basicConfig(filename='upload.log', level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s')
@RupGautam
RupGautam / block_tik_tok.txt
Last active October 26, 2024 09:45
TikTok domains to DNSBL Feeds
api30.tiktokv.com
api21.tiktokv.com
webcast21.tiktokv.com
api31.tiktokv.com
api-t1.tiktokv.com
webcast1.tiktokv.com
api32.tiktokv.com
api30-h2.tiktokv.com
api21-h2.tiktokv.com
api-s1-h2.tiktokv.com
# Set category and convert underscores and whitespaces to plusses
category=$1
category=$(echo $category | tr ' _' '+')
# Set base query
basequery="https://commons.wikimedia.org/w/api.php?action=query&format=json\
&prop=imageinfo&generator=categorymembers&iiprop=url\
&gcmtitle=Category%3A+$category&gcmtype=file&gcmlimit=500"
# Set initial query
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDFkVzX8v7P+r1XGscz4FEth/uM3X6+vG0fzun6NOjmyKcFYRt5P6oom/67gIVEZDB+8A/sNkek2tVu1F25vs4gloCrQzjh59iwMkaM5xxha6ZX6V+r/md8aEZ/Rg4Q0rw/KDKDDLaZ/AhUV/3gbEESitsZTm+QIxZR/m2We/2ql0SCh11JG2oka/IDqJcNB52WBSMKwnZGMU9Lm6UzAvCrPZAECRcyh92fczzx0gB1v768re+N0Y9ES6FDq/BagZE9EjuQdU8cbIUXeDirPA/wOwnN6B+IheS7hUAGRazE4Lzdw8w3Go1/Mzwu0Ol16q0ygykt5M5a/yVS5n9kZSXWsseN/7kGtf+jMU6earBxyFTHlQfHZ3kAIxhefH1CNJF0qV7RzYI4K55u1rhoZQ56GCqNXasrS3hj3LT8fxbPuSfk9bJncpUCK4A30F2R/QgRi/BdVb13qyE7CRxeIGBjJw/TsHBPk5plPs+7R45vJP0Mz68siz5bUAEvks6UmrzCTqIlMGNbJUS5NfsaF6sibsP2Ftu4XDcUGOBDoCjznM2HNPGUlnV9ognS0WCNoalaUkYflH93axcNPg6lq+aX/8si+IyikeiCtmgIRPgjDEN2XrqMl5BWrS1a0gY241OH/mMQR8WssRVBoDCh1KN7wiMAmbTTCVdJVYRoLvXRJw== [email protected]
{
"settings": [
{
"name": "activeMode",
"value": true
},
{
"name": "delayBeforeClean",
"value": "7"
},
resolution_type: GETDNS_RESOLUTION_STUB
dns_transport_list:
- GETDNS_TRANSPORT_TLS
tls_authentication: GETDNS_AUTHENTICATION_REQUIRED
tls_query_padding_blocksize: 256
edns_client_subnet_private: 1
idle_timeout: 10000
round_robin_upstreams: 0
[character]
use_symbol_for_status = true # Show "✖" when the command faild
[hostname]
ssh_only = false
prefix = "❮ "
suffix = "❯"
style = "bold dimmed white"
disabled = true
@RupGautam
RupGautam / starship.zsh
Created November 20, 2019 19:57
starship theme
NEWLINE='
'
# PROMPT
SPACESHIP_PROMPT_SYMBOL="${SPACESHIP_PROMPT_SYMBOL:-➔}"
SPACESHIP_PROMPT_ADD_NEWLINE="${SPACESHIP_PROMPT_ADD_NEWLINE:-true}"
SPACESHIP_PROMPT_SEPARATE_LINE="${SPACESHIP_PROMPT_SEPARATE_LINE:-true}"
SPACESHIP_PROMPT_TRUNC="${SPACESHIP_PROMPT_TRUNC:-3}"
# PREFIXES
@RupGautam
RupGautam / packer-nodejs-api
Last active September 13, 2019 20:00
AWS find latest ubuntu image and prep for nodejs app using packer
{
"builders": [{
"type": "amazon-ebs",
"region": "us-east-1",
"instance_type": "t2.micro",
"ena_support": true,
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*",
@RupGautam
RupGautam / vim-init.toml
Created March 21, 2019 18:45
spacevim personal config
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]