Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
#!/usr/bin/env bash | |
# set -x | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be root to run this script" | |
exit 1 | |
fi | |
# Returns all available interfaces, except "lo" and "veth*". |
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
see slides of a talk on the p2p network similation, testing and monitoring framework http://swarm-gateways.net/bzz:/e5fbcaad92ede8a429896ff91d5653510a16a2cf86061697648340d32bbe40a8/
p2p: network testing framework and protocol abstraction ethereum/go-ethereum#3102
The purpose of this work is to have a comprehensive and modular network testing suite, which is able to drive test harnesses for p2p network behaviour. This includes simulations as well as cluster tests on an actual network.
CREATE TRIGGER person_notify AFTER INSERT OR UPDATE OR DELETE ON income | |
FOR EACH ROW EXECUTE PROCEDURE notify_trigger( | |
'id', | |
'email', | |
'username' | |
); | |
CREATE TRIGGER income_notify AFTER INSERT OR UPDATE OR DELETE ON income | |
FOR EACH ROW EXECUTE PROCEDURE notify_trigger( | |
'id', |
# Using edge-git ensures we're always pulling the latest | |
# You can lock into a specific version using the *-git tags | |
# on https://hub.docker.com/_/docker/ | |
image: docker:edge-git | |
services: | |
- docker:dind | |
# If you only need compose in a specific step definitely put this | |
# only in that step so it's not executed unnecessarily | |
before_script: |