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
export interface RequestQuery { | |
[name: string]: any; | |
} | |
export interface OAuthSignatureSource { | |
oauthConsumerKey: string; | |
oauthToken: string; | |
oauthNonce: string; | |
oauthTimestamp: string; | |
oauthSignatureMethod: string; |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Parameters: | |
# DB Proxy | |
ProxyName: | |
Type: String | |
ProxyEngineFamily: | |
Type: String | |
AllowedValues: | |
- MYSQL |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Parameters: | |
CWLogsExportBucketName: | |
Description: "S3 buket name for CW Logs backup" | |
Type: String | |
CWLogsExportBucketLifecycleStatus: | |
Description: "Apply lifecycle or not" | |
Type: String | |
AllowedValues: ["Disabled", "Enabled"] |
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
ACCESS_TOKEN=xxxxxxxx | |
CHANNEL=xxxxxxxx | |
URL=https://tenki.jp/forecast/3/16/4410/13101/3hours.html | |
TARGET=forecast-point-3h-today |
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 | |
TEST=`sha256sum $1 | cut -d ' ' -f 1` | |
if [ $TEST = $2 ]; then | |
echo "SUCEESS" | |
else | |
echo "FAIL" | |
fi |
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 | |
TYPE=$1 | |
INTERVAL='u1' | |
COUNT='1000000' | |
case $TYPE in | |
"1") docker exec -it r2 ip netns exec attack \ | |
hping3 --icmp -q -i $INTERVAL -c $COUNT 198.51.100.2 ;; | |
"2") docker exec -it r2 ip netns exec attack \ |
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 sys | |
from log import set_logger | |
from time import sleep | |
from mq import MQConsumer | |
LOGFILE = '/etc/exabgp/log' | |
LOGGER = set_logger(LOGFILE) | |
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 iptc | |
import ipaddress | |
def format_address(address): | |
""" | |
Support IPv4 only yet. | |
Return IPv4 with prefix length (e.g. 192.168.0.1/32) | |
""" |
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 sys | |
import socket | |
from time import sleep | |
from threading import Thread | |
SERVER = '127.0.0.1' | |
PORT = 9999 | |
def client(timeout=0): | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: |
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
# -*- conding: utf-8 -*- | |
import socket | |
# address and port is arbitrary | |
def client(host="127.0.0.1", port=60260): | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: | |
sock.connect((host, port)) | |
while True: |
NewerOlder