This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http-server | |
rene $ for i in 16 128; do ab -c $i -n $i http://127.0.0.1:8080/ | grep "Time per"; done | |
Time per request: 20.492 [ms] (mean) | |
Time per request: 1.281 [ms] (mean, across all concurrent requests) | |
Time per request: 138.750 [ms] (mean) | |
Time per request: 1.084 [ms] (mean, across all concurrent requests) | |
# serve | |
rene $ for i in 16 128; do ab -c $i -n $i http://127.0.0.1:8080/ | grep "Time per"; done | |
Time per request: 3.465 [ms] (mean) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "*.epub" -exec sh -c 'ebook-convert "{}" "$(dirname "{}")/$(basename -s .epub "{}").mobi" &' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
require 'uri' | |
def get_file_names(zip_url) | |
# ZIP file format: https://en.wikipedia.org/wiki/ZIP_(file_format) | |
# 1. Do an initial head request to figure out how big the file is from the | |
# content size | |
response = HTTParty.head(zip_url) | |
OlderNewer