Skip to content

Bunch of utilities to make the dev life easier!

Notifications You must be signed in to change notification settings

fabiocicerchia/utils

Repository files navigation

Utils

Requirements

  • Python3
  • Ghostscript

Install

One liner:

wget -O - https://raw.githubusercontent.com/fabiocicerchia/utils/master/installer | sudo sh

Tools

benchmark - Benchmark URL

$ benchmark URL
0.12345 sec

blink_port - Blink NIC led

$ blink_port [NIC=eth0] [TIME=5]

cert_expire - SSL/TLS Certificate Expiration

$ cert_expire DOMAIN
notBefore=May 20 11:55:41 2020 GMT
notAfter=Aug 12 11:55:41 2020 GMT

check_accessibility - Check Accessibility

$ check_accessibility URL
CHECK ACCESSIBILITY
Validate Accessibility (BITV 1.0 - Level 2):
OK|FAIL
Validate Accessibility (Section 508):
OK|FAIL
Validate Accessibility (Stanca Act):
OK|FAIL
Validate Accessibility (WCAG 1.0 - Level AAA):
OK|FAIL
Validate Accessibility (WCAG 2.0 - Level AAA):
OK|FAIL

check_validation - Check Validation

$ check_validation URL
CHECK VALIDATION
Validate W3C:
OK|FAIL
Validate CSS 3:
OK|FAIL
Validate CSS 2.1:
OK|FAIL
Validate CSS 2:
OK|FAIL
Validate CSS Mobile:
OK|FAIL
Validate Feed:
OK|FAIL
Validate HTTP Headers:
OK|FAIL
Validate Semantics:
OK|FAIL
Validate Links:
OK|FAIL

dotenv - Export current env vars in .env file

$ eval `dotenv`
COLORTERM=truecolor
HOME=/home/user
LC_CTYPE=UTF-8
PAGER=less
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:PATH=$PATH:/opt/utils-master
PWD=/
SHELL=/bin/zsh
TERM=xterm-256color
...
$ dotenv > /dev/null

expose - Expose Folder to HTTP port

$ expose [PORT=8080]
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...

gen_passwd - Generate Password

$ gen_passwd [LEN=16]
*******

git_change_date - Git Change Date

$ git_change_date "Mon 08 Jun 2020 20:19:19 CET"

git_commit - Git Commit Random Message

$ git_commit

ip_location - IP Location

$ ip_location 123.123.123.123
Italy
IT
Rome

ip_public - Public IP Address

$ ip_public
123.123.123.123

mac_random - Random MAC Address

$ mac_random
86:ed:59:63:20:58

pdf_compress - Compress PDF's size

$ pdf_compress FILE.PDF

server_specs - Server Specs

$ server_specs
CPU: 4
RAM: 16384 MB
Swap: 2048 MB
Disk: 10Gi
Avg load: 1.53 1.87 1.91
IP Private: 192.168.0.2
IP Public: 123.123.123.123
Location: Italy

spider - Launch a spider on a URL

$ spider URL [HTTP_AUTH_USER HTTP_AUTH_PASS]
...

spin_container - Launch a temp docker container

$ spin_container IMAGE [TAG=latest]

stealth - Disable Command History

$ stealth

timestamp - Convert Timestamp

$ timestamp 1234567890
Fri Feb 13 15:26:30 EST 2009

Notes

  • Freeze the requirements: pip3 freeze > requirements.txt
  • Install the requirements: pip3 install -r requirements.txt

About

Bunch of utilities to make the dev life easier!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published