More often than not, you already typed yesterday the commands you’re about to use today. Wouldn’t it be handy to be able to retrieve the long command instead of typing them yet another time?
Hit Ctrl+R
, you’ll see:
(reverse-i-search)`':
#!/usr/bin/env python | |
from type_checked_entities import entity_factory | |
Giraffe = entity_factory( # let's define what is a giraffe! | |
"giraffe", | |
name=str, # my name is a string | |
age=float, # my age is an int | |
eats=object, # I eat pretty much everything. | |
) |
#!/usr/bin/env python | |
import os | |
import sys | |
from markdown2 import markdown | |
from xhtml2pdf import pisa | |
""" | |
## Inspired by |
Any output (to stdout
and stderr
) generated by a crontab task will be sent to you by email.
This is great to generate system reports or be alerted when something goes wrong.
By default crontab (and the MTA it relies on) will use a text/plain
MIME type.
But you can make crontab tells the mail sender to use another MIME type, like text/html
.
Open crontab with crontab -e
, and add this line:
Sometimes you have a process you lost the PID, and would like to kill it.
You can use top
(or better htop
) to search for your process name and press k
to kill it.
But this isn’t optimal when you aren’t sure of its name.
A better alternative is to search by the port opened, for example port 80:
sudo lsof -i :80
<form accept-charset="UTF-8" action="/payment" class="cardInfo" method="post"> | |
<fieldset class="cardInfo__cardDetails"> | |
<div class="form-row cardInfo__cc-num"> | |
<label for="cc-num"><abbr title="required">*</abbr><span>Card Number</span></label> | |
<div class="cc-num__wrap"> | |
<!-- using type="tel" because type="number" doesn’t pass HTML5 form validation with jQuery.payment formatting --> | |
<input id="cc-num" type="tel" class="paymentInput cc-num" placeholder="•••• •••• •••• ••••" autocompletetype="cc-number" required="required"> | |
<span class="card" aria-hidden="true"></span> |
{ | |
"version": 1, | |
"disable_existing_loggers": false, | |
"formatters": { | |
"simple": { | |
"format": "%(asctime)s - %(levelname)s - %(module)s - %(message)s" | |
}, | |
"debug": { | |
"format": "%(asctime)s - %(levelname)s - %(pathname)s:%(lineno)s:%(funcName)s - %(message)s" | |
} |
{ | |
"scripts": { | |
"test": "mocha" | |
}, | |
"engines": { | |
"node": ">= 7.0" | |
}, | |
"devDependencies": { | |
"leakage": "./path/to/local/leakage/branch/feature/async-support", | |
"mocha": "^3.2.0", |
Following our series on HTTP, here is a quick note on HTTP status code, sent with the HTTP response. They are organized in 5 categories:
1xx Informational, ex:
100 Continue
used when doing a multi-part file upload101 Switching Protocol
used when switching from HTTP to WebSocket2xx Success, ex: