See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
'Emulate max() as fully as possible in pure Python.' | |
# https://stackoverflow.com/questions/69997857/implementation-of-max-function-in-python/69997876#69997876 | |
# https://github.com/python/mypy/issues/7231 | |
from typing import TypeVar, Any, Iterator, Iterable, Optional | |
from typing import Union, Protocol, Callable, cast, Tuple, overload | |
class SupportsGT(Protocol): |
bind: 0.0.0.0:8000 | |
workers: 1 | |
worker_class: "example.worker:CustomWorker" | |
timeout: 30 | |
ca_certs: ca.crt | |
certfile: server.crt | |
keyfile: server.key | |
cert_reqs: 2 | |
do_handshake_on_connect: true |
zmq: 2.904726 | |
queue: 12.812472 |
#!/bin/sh | |
# ngrok's web interface is HTML, but configuration is bootstrapped as a JSON | |
# string. We can hack out the forwarded hostname by extracting the next | |
# `*.ngrok.io` string from the JSON | |
# | |
# Brittle as all get out--YMMV. If you're still reading, usage is: | |
# | |
# $ ./ngrok_hostname.sh <proto> <addr> | |
# |
A basic set of systemd
units for starting Nginx and PHP-FPM daemons on system startup.
/run/nginx.pid
./run/php7/php-fpm.pid
, PHP7 PHP-FPM config at /etc/php7
.Unit files are placed in /etc/systemd/system
and enabled with:
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
Press minus + shift + s
and return
to chop/fold long lines!
#!/bin/sh | |
# | |
# Copyright (c) 2011, Vladimir Osintsev | |
# | |
# Trying to make a universal script that will be suitable on Debian | |
# and Ubuntu systems (supporting several versions). This script generates | |
# necessary configuration files in /etc/apt and perform PHP downgrade | |
# Get distribution and release name |