- http://serverfault.com/questions/416787/nginx-403-forbidden-error-hosting-in-user-home-directory
- rails deploy with rvm, capistrano, uniron, nginx
This file contains hidden or 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
// Updated: Aug. 20, 2024 | |
// Run: node testRegex.js whatever.txt | |
// Live demo: https://jina.ai/tokenizer | |
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) | |
// COPYRIGHT: Jina AI | |
const fs = require('fs'); | |
const util = require('util'); | |
// Define variables for magic numbers | |
const MAX_HEADING_LENGTH = 7; |
This file contains hidden or 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
"""MkDocs hook for performance debugging | |
The idea behind it is to provide a minimal curated performance log for a `mkdocs build` run. | |
Of course anyone can use a proper profiler, but the output often contains a lot of non-critical data | |
that the user has to first filter to get a clearer picture. This hook takes care of this and allows | |
to quickly see where a bottleneck is occurring. It also has a lower overhead than a proper profiler. | |
It creates a file in the current working directory, it can be configured easily with variables set | |
at the bottom of the file. There are also the timing categories included. |
This file contains hidden or 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
--Read the binary file, lua takes binary files with no difference to strings(all UNIX;https://www.lua.org/pil/21.2.2.html). But, use 'b' tag | |
local inp = assert(io.open("xxxx.xml.gz", "rb")) | |
local data = inp:read("*all") | |
--HTTP custom settings | |
--Remember to set the schema, host and port here otherwise it will use default. | |
wrk.scheme = "http" | |
wrk.host = "localhost" | |
wrk.port = 3000 |
This file contains hidden or 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
#!/usr/bin/env bash | |
# ----------------------------------------------------------------------------- | |
# 1. Download SVG | |
if [ ! -f logo.svg ]; then | |
curl https://www.python.org/static/community_logos/python-logo-inkscape.svg > logo.svg | |
fi | |
# ----------------------------------------------------------------------------- |
This file contains hidden or 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
#!/usr/bin/python | |
""" | |
Report branches or commits that are not yet merged into master. | |
""" | |
import subprocess | |
from os.path import basename | |
# Merge/environment branches. These will be excluded from the | |
# "unmerged branches" list. | |
EXCLUDE_BRANCHES = ['staging', 'uat', 'production', 'master'] |