国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
import logging | |
import time | |
from django.conf import settings | |
from django.db import connection | |
THRESHOLD = getattr(settings, 'SLOW_REQUEST_THRESHOLD', 1.0) | |
LOG_SQL = getattr(settings, 'SLOW_REQUEST_LOG_SQL', False) | |
LOG = logging.getLogger(__name__) |
#!/bin/bash | |
set -e | |
export CONFIG_MODULE_SIG=n | |
export CONFIG_MODULE_SIG_ALL=n | |
# For current kernel | |
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}') | |
temp_dir=$(mktemp -d) | |
echo "Installing FacetimeHD camera for $KERNELRELEASE" |
# MOVED to public repo: https://github.com/catchdave/ssl-certs/blob/main/replace_synology_ssl_certs.sh |
# How to use acme.sh to set up Let's Encrypt, with the script being run | |
# mostly without root permissions | |
# See https://github.com/Neilpang/acme.sh for more | |
# These instructions use the domain "EXAMPLE.COM" as an example | |
# These instructions: | |
# - work on Ubuntu 18.04 and 20.04 with nginx | |
# - use CloudFlare DNS validation |
import macros | |
proc typeName(head: NimNode): NimNode = | |
if head.len == 0: head else: head[1] | |
proc baseName(head: NimNode): NimNode = | |
if head.len == 0: newIdentNode("RootObj") else: head[2] | |
proc isObjectDef(head: NimNode): bool = | |
head.len == 0 or head[2].kind == nnkIdent |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
# Add this to your .bashrc | |
# Use it like: you@console_>$ _get https://website.org/file.txt | |
_get () | |
{ | |
IFS=/ read proto z host query <<< "$1" | |
exec 3< /dev/tcp/$host/80 | |
{ | |
echo GET /$query HTTP/1.1 | |
echo connection: close | |
echo host: $host |
Google's GBoard software keyboard has a Morse code mode.
Here's what characters it currently supports:
.-
→ a
-...
→ b
-.-.
→ c
-..
→ d
#!/bin/sh | |
# | |
function killAllProcs( ) | |
{ | |
sudo /usr/bin/killall $1 | |
/bin/ps ax | /usr/bin/grep $1|/usr/bin/awk '{print $1}'|/usr/bin/xargs sudo kill -9 | |
} | |
echo "removing LANDesk Client" |
Adapted from Mike Bostock's Zoomable Sunburst to include arc labels.
Click on any arc to zoom in. Click on the center circle to zoom out. Click on canvas background to reset zoom.
Also packaged as a reusable component at sunburst-chart.