---
# Python 简介
@su27 and @menghan
----
高级
-
易学易读易维护
| #!/bin/bash | |
| # | |
| BASE=/tmp | |
| PID=$BASE/app.pid | |
| LOG=$BASE/app.log | |
| ERROR=$BASE/app-error.log | |
| PORT=11211 | |
| LISTEN_IP='0.0.0.0' | |
| MEM_SIZE=4 |
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |
This document was originally posted on 8/1/2013.
Rocket is a technique for building real-time functionality on top of REST web services that leverages web standards like [Server-Sent Events][SSE] and [JSON Patch][RFC6902]. Most importantly, it fits comfortably with how you're already building applications.
Just as light can act as both a particle and a wave, so information can be thought as both a document and a stream.
Each approach has its particular strengths and weaknesses:
| #!/usr/bin/python | |
| ''' Not my script, found on the Internet, and rediscovered on my hard drive | |
| ''' | |
| import sys | |
| def cidr_to_regex(cidr): | |
| ip, prefix = cidr.split('/') | |
| base = 0 | |
| for val in map(int, ip.split('.')): |
These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).
Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.
Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.