$ aws rds describe-db-snapshots --snapshot-type automated | jq '.DBSnapshots | sort_by(.SnapshotCreateTime) | reverse | .[0]'
{
"Engine": "mysql",
"SnapshotCreateTime": "2016-09-25T18:46:55.366Z",
"AvailabilityZone": "ap-northeast-1a",
"PercentProgress": 100,
"MasterUsername": "root",
FYI: https://qiita.com/sfujiwara/items/b227b3ca6a1e8f104bc9
$ date +%z
+0900
$ /path/to/resty start_time.lua
1970-01-01T09:00:00+09:00
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
package main | |
import ( | |
"fmt" | |
"gopkg.in/alecthomas/kingpin.v2" | |
) | |
var ( | |
verbose = kingpin.Flag("verbose", "Enable verbose mode.").Short('v').Counter() |
Install tcpkill
yum -y install dsniff --enablerepo=epel
View connections
netstat -tnpa | grep ESTABLISHED.*sshd.
Block with ip tables
iptables -A INPUT -s IP-ADDRESS -j DROP
Kill connection
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
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
) | |
func Handler(w http.ResponseWriter, req *http.Request) { |
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
package main | |
/* | |
#include <EXTERN.h> | |
#include <perl.h> | |
#include <stdio.h> | |
void init_perl() { | |
// PerlのCランタイムの初期化(全体で1回) | |
int argc = 0; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <errno.h> | |
int main(int argc, char **argv) | |
{ | |
struct addrinfo hints, *ai, *ai_p; | |
const char *name; |
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 | |
# | |
# consul Manage the consul agent | |
# | |
# chkconfig: 2345 95 95 | |
# description: Consul is a tool for service discovery and configuration | |
# processname: consul | |
# config: /etc/consul.conf | |
# pidfile: /var/run/consul.pid |
NewerOlder