When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
->Setting processData to false lets you prevent jQuery from automatically transforming the data into a query string. | |
And Setting the contentType to false is imperative. | |
Refference link: https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects | |
//01// File Upload using FormData Object in Javascript | |
Syntax: | |
var formData = new FormData(); // Currently empty | |
formData.append(name, value); // custom text field where key/value pair | |
formData.append(name, value, filename); // Custom file uploading |
#!/bin/bash | |
settings() { | |
SCRIPT_DIR="$(dirname "$0")" | |
} | |
main() { | |
request $@ | |
settings | |
run |
# Read email in inbox, look for any URLs and update them to wallabag, delete email if URLs found in it. | |
# Built from various internet sources. Final code donated under GPL v3 by Github user aptgetupgrade | |
# Tested using python 2. Could be run as part of a crontab, e.g. every 5 mins. | |
# | |
import sys | |
import imaplib | |
import getpass | |
import email | |
import email.header | |
import datetime |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#!/usr/sbin/env bash | |
while true; do | |
curl $1 -s > /dev/null | |
echo . | |
done | pv -l > /dev/null |
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
# 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 |