# get total requests by status code | |
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
# get top requesters by IP | |
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
# get top requesters by user agent | |
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
# get top requests by URL |
Thanks to Automated Snapshots / Backups via Vultr API And this is Python3 version script used to Automatic snapshots using Vultr API
A more customizable alternative to Vultr's backup feature using Vultr API v1. Tested on Ubuntu 16.04. Run this python3
script on Anywhere to create a snapshot of VPS (which you know IP or it's subid) and rotate out the oldest snapshot(s). Use the BACKUP_TAG_PREFIX
prefix field to uniquely id a set of snapshots.
Notice: You can only create 11 snapshots by default.
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |
Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.
This is just a picture of this link from Feb
{ | |
"explorer.openEditors.visible": 0, | |
"workbench.colorTheme": "Default Light+", | |
"workbench.iconTheme": "vscode-simpler-icons", | |
"workbench.sideBar.location": "right", | |
"editor.wordWrap": "on", | |
"editor.fontFamily": "'Microsoft YaHei Mono', Consolas, 'Noto Sans CJK TC Medium', 'Courier New', monospace", | |
"editor.fontLigatures": true, |
Mosh (mobile shell) is a gift from the Gods(tm). Anyone with spotty internet or wireless connection has suffered the pain of a lost SSH session. Sure, one can fire up screen
(or tmux
as the kids are using these days), but that's an extra step and you are still using the SSH protocol.
I'm not here to tout the benefits of Mosh, you came here to open it up in your firewall.
- Create the following file as
/etc/firewalld/services/mosh.xml
firewall-cmd --reload
firewall-cmd --add-service=mosh --permanent
If you tend to have a lot of sessions (not recommended), you can increase the ports, but the default should be fine for most applications.
<html> | |
<head> | |
<style> | |
td{ | |
border: 1px solid #000000; | |
width:20px; | |
height:20px; | |
} | |
.td_black{ | |
background: black; |